forked from mirror/async-std
use take and remove Copy
This commit is contained in:
parent
fb78ed1812
commit
7cfec4e8ce
2 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,7 @@ where
|
||||||
}
|
}
|
||||||
Poll::Pending
|
Poll::Pending
|
||||||
}
|
}
|
||||||
None => Poll::Ready(*this.min),
|
None => Poll::Ready(this.min.take()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -633,6 +633,7 @@ extension_trait! {
|
||||||
) -> impl Future<Output = Option<Self::Item>> [MinByKeyFuture<Self, Self::Item, K>]
|
) -> impl Future<Output = Option<Self::Item>> [MinByKeyFuture<Self, Self::Item, K>]
|
||||||
where
|
where
|
||||||
Self: Sized,
|
Self: Sized,
|
||||||
|
Self::Item: Ord,
|
||||||
K: FnMut(&Self::Item) -> Self::Item,
|
K: FnMut(&Self::Item) -> Self::Item,
|
||||||
{
|
{
|
||||||
MinByKeyFuture::new(self, key_by)
|
MinByKeyFuture::new(self, key_by)
|
||||||
|
|
Loading…
Reference in a new issue