diff options
Diffstat (limited to 'src/wrappers/mpsc_unbounded.rs')
-rw-r--r-- | src/wrappers/mpsc_unbounded.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wrappers/mpsc_unbounded.rs b/src/wrappers/mpsc_unbounded.rs index bc5f40c..54597b7 100644 --- a/src/wrappers/mpsc_unbounded.rs +++ b/src/wrappers/mpsc_unbounded.rs @@ -51,3 +51,9 @@ impl<T> AsMut<UnboundedReceiver<T>> for UnboundedReceiverStream<T> { &mut self.inner } } + +impl<T> From<UnboundedReceiver<T>> for UnboundedReceiverStream<T> { + fn from(recv: UnboundedReceiver<T>) -> Self { + Self::new(recv) + } +} |