Skip to content

Commit

Permalink
style: allow clippy::mut_from_ref (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC authored Oct 23, 2024
1 parent d2a0893 commit ecc0e0c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/simplex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ impl<'stream, Buf: monoio::buf::IoBufMut> SimplexStreamReadFuture<'stream, Buf>
/// # SAFETY
///
/// Know what you are doing before using this function.
#[allow(clippy::mut_from_ref)]
unsafe fn stream_mut(&self) -> &mut SimplexStream {
let raw_ptr = self.stream.get();
*raw_ptr
Expand All @@ -357,6 +358,7 @@ impl<'stream, Buf: monoio::buf::IoBufMut> SimplexStreamReadFuture<'stream, Buf>
/// # SAFETY
///
/// Know what you are doing before using this function.
#[allow(clippy::mut_from_ref)]
unsafe fn buf_mut(&self) -> &mut Buf {
let raw_ptr = self.buf.get();
&mut *raw_ptr
Expand Down Expand Up @@ -408,6 +410,7 @@ impl<'stream, Buf: monoio::buf::IoVecBufMut> SimplexStreamReadvFuture<'stream, B
/// # SAFETY
///
/// Know what you are doing before using this function.
#[allow(clippy::mut_from_ref)]
unsafe fn stream_mut(&self) -> &mut SimplexStream {
let raw_ptr = self.stream.get();
*raw_ptr
Expand All @@ -418,6 +421,7 @@ impl<'stream, Buf: monoio::buf::IoVecBufMut> SimplexStreamReadvFuture<'stream, B
/// # SAFETY
///
/// Know what you are doing before using this function.
#[allow(clippy::mut_from_ref)]
unsafe fn buf_mut(&self) -> &mut Buf {
let raw_ptr = self.buf.get();
&mut *raw_ptr
Expand Down Expand Up @@ -482,6 +486,7 @@ impl<'stream, Buf: monoio::buf::IoBuf> SimplexStreamWriteFuture<'stream, Buf> {
/// # SAFETY
///
/// Know what you are doing before using this function.
#[allow(clippy::mut_from_ref)]
unsafe fn stream_mut(&self) -> &mut SimplexStream {
let raw_ptr = self.stream.get();
*raw_ptr
Expand Down Expand Up @@ -529,6 +534,7 @@ impl<'stream, Buf: monoio::buf::IoVecBuf> SimplexStreamWritevFuture<'stream, Buf
/// # SAFETY
///
/// Know what you are doing before using this function.
#[allow(clippy::mut_from_ref)]
unsafe fn stream_mut(&self) -> &mut SimplexStream {
let raw_ptr = self.stream.get();
*raw_ptr
Expand Down

0 comments on commit ecc0e0c

Please sign in to comment.