Skip to content

Commit

Permalink
update unsound dev dependency and fix mapped_futures memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
StoicDeveloper committed Jul 18, 2024
1 parent 4c0df04 commit b89460e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion futures-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions futures-util/src/stream/mapped_futures/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ impl<K: Hash + Eq, Fut> MappedFutures<K, Fut> {
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;
}
Expand Down

0 comments on commit b89460e

Please sign in to comment.