stream: fix StreamMap Default bound (#3093)

This commit is contained in:
Artem Vorotnikov
2020-11-03 09:09:05 +01:00
committed by GitHub
parent 42de3bc7a4
commit 06c7e73e99
+7 -1
View File
@@ -156,7 +156,7 @@ use std::task::{Context, Poll};
/// } /// }
/// } /// }
/// ``` /// ```
#[derive(Debug, Default)] #[derive(Debug)]
pub struct StreamMap<K, V> { pub struct StreamMap<K, V> {
/// Streams stored in the map /// Streams stored in the map
entries: Vec<(K, V)>, entries: Vec<(K, V)>,
@@ -513,6 +513,12 @@ where
} }
} }
impl<K, V> Default for StreamMap<K, V> {
fn default() -> Self {
Self::new()
}
}
impl<K, V> Stream for StreamMap<K, V> impl<K, V> Stream for StreamMap<K, V>
where where
K: Clone + Unpin, K: Clone + Unpin,