diff --git a/futures-util/Cargo.toml b/futures-util/Cargo.toml index f1b8bbd34..454c55067 100644 --- a/futures-util/Cargo.toml +++ b/futures-util/Cargo.toml @@ -48,7 +48,7 @@ pin-project-lite = "0.2.6" futures = { path = "../futures", features = ["async-await", "thread-pool"] } futures-test = { path = "../futures-test" } tokio = "0.1.11" -futures-timer = "3.0.2" +futures-timer = "3.0.3" [package.metadata.docs.rs] all-features = true diff --git a/futures-util/src/stream/mapped_futures/mod.rs b/futures-util/src/stream/mapped_futures/mod.rs index a839c6dc8..32aaa2b86 100644 --- a/futures-util/src/stream/mapped_futures/mod.rs +++ b/futures-util/src/stream/mapped_futures/mod.rs @@ -167,9 +167,7 @@ impl MappedFutures { if let Some(task) = self.set().take(key) { unsafe { if (*task.future.get()).is_some() { - let cell = task.future.get(); - cell.drop_in_place(); - cell.write(None); + *task.future.get() = None; self.inner.unlink(Arc::as_ptr(&task.inner)); return true; }