diff --git a/futures-util/src/stream/futures_keyed/task.rs b/futures-util/src/stream/futures_keyed/task.rs index 70ed3d6b1..4538ccbbe 100644 --- a/futures-util/src/stream/futures_keyed/task.rs +++ b/futures-util/src/stream/futures_keyed/task.rs @@ -167,8 +167,8 @@ impl Deref for HashTask { impl Borrow for HashTask { fn borrow(&self) -> &K { // Never use the borrowed form after the key has been removed from the task - // Never use Task in a context where this method may be called // IE. The Stub task never goes into the HashSet + // Or removing Task from HashSet using key, after key removed from task unsafe { (*self.key.get()).as_ref().unwrap() } } }