Skip to content

Commit c91893c

Browse files
committed
silence warning
1 parent 7d2a1a8 commit c91893c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@ impl<S> StreamWrapper<S> {
4141
/// wrapper must be pinned in memory.
4242
unsafe fn parts(&mut self) -> (Pin<&mut S>, &mut Context<'_>) {
4343
debug_assert_ne!(self.context, 0);
44-
let stream = Pin::new_unchecked(&mut self.stream);
45-
let context = &mut *(self.context as *mut _);
46-
(stream, context)
44+
unsafe {
45+
let stream = Pin::new_unchecked(&mut self.stream);
46+
let context = &mut *(self.context as *mut _);
47+
(stream, context)
48+
}
4749
}
4850
}
4951

0 commit comments

Comments
 (0)