Skip to content

Commit 4c0df04

Browse files
remove unnecessary deref
1 parent 7976819 commit 4c0df04

File tree

1 file changed

+3
-1
lines changed
  • futures-util/src/stream/mapped_futures

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ 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-
task.future.get().write(None);
170+
let cell = task.future.get();
171+
cell.drop_in_place();
172+
cell.write(None);
171173
self.inner.unlink(Arc::as_ptr(&task.inner));
172174
return true;
173175
}

0 commit comments

Comments
 (0)