Skip to content

Commit b89460e

Browse files
update unsound dev dependency and fix mapped_futures memory leak
1 parent 4c0df04 commit b89460e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

futures-util/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pin-project-lite = "0.2.6"
4848
futures = { path = "../futures", features = ["async-await", "thread-pool"] }
4949
futures-test = { path = "../futures-test" }
5050
tokio = "0.1.11"
51-
futures-timer = "3.0.2"
51+
futures-timer = "3.0.3"
5252

5353
[package.metadata.docs.rs]
5454
all-features = true

futures-util/src/stream/mapped_futures/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,7 @@ impl<K: Hash + Eq, Fut> MappedFutures<K, Fut> {
167167
if let Some(task) = self.set().take(key) {
168168
unsafe {
169169
if (*task.future.get()).is_some() {
170-
let cell = task.future.get();
171-
cell.drop_in_place();
172-
cell.write(None);
170+
*task.future.get() = None;
173171
self.inner.unlink(Arc::as_ptr(&task.inner));
174172
return true;
175173
}

0 commit comments

Comments
 (0)