Skip to content

Commit 9fc8b25

Browse files
Apply suggestion from @teor2345
Co-authored-by: teor <[email protected]>
1 parent a3bfe9f commit 9fc8b25

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/futures_map.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ where
141141
// SAFETY: this returns `None` and drops a `&T`, which is safe because dropping a reference is trivial.
142142
let inner = any.downcast_ref::<T>()?;
143143

144-
// Safety: The pointer is already pinned.
144+
// Safety: The pointer is already pinned, and will remain pinned for its entire lifetime,
145+
// because we return a `Pin<&T>`.
145146
let pinned = unsafe { Pin::new_unchecked(inner) };
146147

147148
Some((&a.tag, pinned))

0 commit comments

Comments
 (0)