mirror of
https://github.com/Noratrieb/ice-104649.git
synced 2026-01-14 12:35:02 +01:00
more
This commit is contained in:
parent
79e9aa8d4f
commit
39b121e064
1 changed files with 2 additions and 9 deletions
11
src/main.rs
11
src/main.rs
|
|
@ -1,10 +1,6 @@
|
|||
use std::marker::PhantomData;
|
||||
|
||||
use futures::{stream, Future, StreamExt};
|
||||
|
||||
pub struct JoinHandle<T> {
|
||||
_p: PhantomData<T>,
|
||||
}
|
||||
pub struct JoinHandle<T>(T);
|
||||
|
||||
impl<T> Future for JoinHandle<T> {
|
||||
type Output = Result<T, ()>;
|
||||
|
|
@ -17,10 +13,7 @@ impl<T> Future for JoinHandle<T> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn spawn<T>(future: T) -> JoinHandle<T::Output>
|
||||
where
|
||||
T: Future,
|
||||
{
|
||||
pub fn spawn<T: Future>(future: T) -> JoinHandle<T::Output> {
|
||||
loop {}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue