mirror of
https://github.com/async-rs/async-std.git
synced 2025-03-04 17:19:41 +00:00
Remoe the T: Copy bound on the item
This commit is contained in:
parent
7677e9a3df
commit
f14b37ff17
1 changed files with 1 additions and 3 deletions
|
@ -50,7 +50,6 @@ pub fn successors<F, Fut, T>(first: Option<T>, succ: F) -> Successors<F, Fut, T>
|
||||||
where
|
where
|
||||||
F: FnMut(&T) -> Fut,
|
F: FnMut(&T) -> Fut,
|
||||||
Fut: Future<Output = Option<T>>,
|
Fut: Future<Output = Option<T>>,
|
||||||
T: Copy,
|
|
||||||
{
|
{
|
||||||
Successors {
|
Successors {
|
||||||
succ: succ,
|
succ: succ,
|
||||||
|
@ -84,7 +83,6 @@ impl<F, Fut, T> Stream for Successors<F, Fut, T>
|
||||||
where
|
where
|
||||||
Fut: Future<Output = Option<T>>,
|
Fut: Future<Output = Option<T>>,
|
||||||
F: FnMut(&T) -> Fut,
|
F: FnMut(&T) -> Fut,
|
||||||
T: Copy,
|
|
||||||
{
|
{
|
||||||
type Item = T;
|
type Item = T;
|
||||||
|
|
||||||
|
@ -96,7 +94,7 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
if this.future.is_none() {
|
if this.future.is_none() {
|
||||||
let fut = (this.succ)(&this.slot.unwrap());
|
let fut = (this.succ)(this.slot.as_ref().unwrap());
|
||||||
this.future.set(Some(fut));
|
this.future.set(Some(fut));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue