We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d2a1a8 commit c91893cCopy full SHA for c91893c
src/lib.rs
@@ -41,9 +41,11 @@ impl<S> StreamWrapper<S> {
41
/// wrapper must be pinned in memory.
42
unsafe fn parts(&mut self) -> (Pin<&mut S>, &mut Context<'_>) {
43
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)
+ unsafe {
+ let stream = Pin::new_unchecked(&mut self.stream);
+ let context = &mut *(self.context as *mut _);
47
+ (stream, context)
48
+ }
49
}
50
51
0 commit comments