summaryrefslogtreecommitdiff
path: root/src/wrappers/broadcast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/wrappers/broadcast.rs')
-rw-r--r--src/wrappers/broadcast.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wrappers/broadcast.rs b/src/wrappers/broadcast.rs
index 3bddbb7..c8346a6 100644
--- a/src/wrappers/broadcast.rs
+++ b/src/wrappers/broadcast.rs
@@ -71,3 +71,9 @@ impl<T> fmt::Debug for BroadcastStream<T> {
f.debug_struct("BroadcastStream").finish()
}
}
+
+impl<T: 'static + Clone + Send> From<Receiver<T>> for BroadcastStream<T> {
+ fn from(recv: Receiver<T>) -> Self {
+ Self::new(recv)
+ }
+}