diff --git a/src/stream/successors.rs b/src/stream/successors.rs index 446ffe5..e86512b 100644 --- a/src/stream/successors.rs +++ b/src/stream/successors.rs @@ -50,7 +50,6 @@ pub fn successors(first: Option, succ: F) -> Successors where F: FnMut(&T) -> Fut, Fut: Future>, - T: Copy, { Successors { succ: succ, @@ -84,7 +83,6 @@ impl Stream for Successors where Fut: Future>, 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)); }