From 06c7e73e9941ae8d7f84e978b24cb2e0664453de Mon Sep 17 00:00:00 2001 From: Artem Vorotnikov Date: Tue, 3 Nov 2020 11:09:05 +0300 Subject: stream: fix StreamMap Default bound (#3093) --- tokio/src/stream/stream_map.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tokio/src/stream/stream_map.rs b/tokio/src/stream/stream_map.rs index 8539e4da..9fed3c19 100644 --- a/tokio/src/stream/stream_map.rs +++ b/tokio/src/stream/stream_map.rs @@ -156,7 +156,7 @@ use std::task::{Context, Poll}; /// } /// } /// ``` -#[derive(Debug, Default)] +#[derive(Debug)] pub struct StreamMap { /// Streams stored in the map entries: Vec<(K, V)>, @@ -513,6 +513,12 @@ where } } +impl Default for StreamMap { + fn default() -> Self { + Self::new() + } +} + impl Stream for StreamMap where K: Clone + Unpin, -- cgit v1.2.3