summaryrefslogtreecommitdiff
path: root/src/wrappers/mpsc_bounded.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wrappers/mpsc_bounded.rs')
-rw-r--r--src/wrappers/mpsc_bounded.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wrappers/mpsc_bounded.rs b/src/wrappers/mpsc_bounded.rs
index e4f9000..b536268 100644
--- a/src/wrappers/mpsc_bounded.rs
+++ b/src/wrappers/mpsc_bounded.rs
@@ -57,3 +57,9 @@ impl<T> AsMut<Receiver<T>> for ReceiverStream<T> {
&mut self.inner
}
}
+
+impl<T> From<Receiver<T>> for ReceiverStream<T> {
+ fn from(recv: Receiver<T>) -> Self {
+ Self::new(recv)
+ }
+}