2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-02-28 15:19:41 +00:00

use take and remove Copy

This commit is contained in:
yjhmelody 2019-10-27 00:26:19 +08:00
parent fb78ed1812
commit 7cfec4e8ce
2 changed files with 2 additions and 1 deletions

View file

@ -54,7 +54,7 @@ where
}
Poll::Pending
}
None => Poll::Ready(*this.min),
None => Poll::Ready(this.min.take()),
}
}
}

View file

@ -633,6 +633,7 @@ extension_trait! {
) -> impl Future<Output = Option<Self::Item>> [MinByKeyFuture<Self, Self::Item, K>]
where
Self: Sized,
Self::Item: Ord,
K: FnMut(&Self::Item) -> Self::Item,
{
MinByKeyFuture::new(self, key_by)