Skip to content

Commit

Permalink
io: implemented get_ref and get_mut for SyncIoBridge (#7128)
Browse files Browse the repository at this point in the history
Co-authored-by: ow <[email protected]>
  • Loading branch information
wngr and ow authored Jan 28, 2025
1 parent 2671ffb commit 5086e56
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tokio-util/src/io/sync_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,15 @@ impl<T: Unpin> SyncIoBridge<T> {
self.src
}
}

impl<T> AsMut<T> for SyncIoBridge<T> {
fn as_mut(&mut self) -> &mut T {
&mut self.src
}
}

impl<T> AsRef<T> for SyncIoBridge<T> {
fn as_ref(&self) -> &T {
&self.src
}
}

0 comments on commit 5086e56

Please sign in to comment.