io: add SyncIOBridge::into_inner (#5971)

This commit is contained in:
Colin Walters
2023-09-01 13:01:22 +00:00
committed by GitHub
parent 37bb47c4a2
commit fd7d0ad5e5
2 changed files with 17 additions and 0 deletions
+5
View File
@@ -140,4 +140,9 @@ impl<T: Unpin> SyncIoBridge<T> {
pub fn new_with_handle(src: T, rt: tokio::runtime::Handle) -> Self {
Self { src, rt }
}
/// Consume this bridge, returning the underlying stream.
pub fn into_inner(self) -> T {
self.src
}
}