forked from mirror/async-std
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
|
||||
F: FnMut(&T) -> Fut,
|
||||
Fut: Future<Output = Option<T>>,
|
||||
T: Copy,
|
||||
{
|
||||
Successors {
|
||||
succ: succ,
|
||||
|
@ -84,7 +83,6 @@ impl<F, Fut, T> Stream for Successors<F, Fut, T>
|
|||
where
|
||||
Fut: Future<Output = Option<T>>,
|
||||
F: FnMut(&T) -> Fut,
|
||||
T: Copy,
|
||||
{
|
||||
type Item = T;
|
||||
|
||||
|
@ -96,7 +94,7 @@ where
|
|||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue