Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StreamMap: fix Default bound #3093

Merged
merged 1 commit into from Nov 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion tokio/src/stream/stream_map.rs
Expand Up @@ -156,7 +156,7 @@ use std::task::{Context, Poll};
/// }
/// }
/// ```
#[derive(Debug, Default)]
#[derive(Debug)]
pub struct StreamMap<K, V> {
/// Streams stored in the map
entries: Vec<(K, V)>,
Expand Down Expand Up @@ -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>
where
K: Clone + Unpin,
Expand Down