From f14b37ff17618a72dbb441cb1a33cb122c70339d Mon Sep 17 00:00:00 2001 From: Felipe Sere Date: Mon, 11 Nov 2019 09:15:38 +0100 Subject: [PATCH] Remoe the T: Copy bound on the item --- src/stream/successors.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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)); }