From efe50d5c26f57ea451894951629e59cca44f843d Mon Sep 17 00:00:00 2001 From: TennyZhuang Date: Fri, 16 Sep 2022 00:51:15 +0800 Subject: [PATCH] remove some double trait bounds Signed-off-by: TennyZhuang --- futures-util/src/stream/stream/buffer_unordered.rs | 6 +----- futures-util/src/stream/stream/chunks.rs | 5 +---- futures-util/src/stream/stream/ready_chunks.rs | 5 +---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/futures-util/src/stream/stream/buffer_unordered.rs b/futures-util/src/stream/stream/buffer_unordered.rs index 94414ac057..22a525cde6 100644 --- a/futures-util/src/stream/stream/buffer_unordered.rs +++ b/futures-util/src/stream/stream/buffer_unordered.rs @@ -42,11 +42,7 @@ where St: Stream, St::Item: Future, { - pub(super) fn new(stream: St, n: Option) -> Self - where - St: Stream, - St::Item: Future, - { + pub(super) fn new(stream: St, n: Option) -> Self { Self { stream: super::Fuse::new(stream), in_progress_queue: FuturesUnordered::new(), diff --git a/futures-util/src/stream/stream/chunks.rs b/futures-util/src/stream/stream/chunks.rs index 8e8ed3bd86..18129889d0 100644 --- a/futures-util/src/stream/stream/chunks.rs +++ b/futures-util/src/stream/stream/chunks.rs @@ -21,10 +21,7 @@ pin_project! { } } -impl Chunks -where - St: Stream, -{ +impl Chunks { pub(super) fn new(stream: St, capacity: usize) -> Self { assert!(capacity > 0); diff --git a/futures-util/src/stream/stream/ready_chunks.rs b/futures-util/src/stream/stream/ready_chunks.rs index d3618d81e8..d4113367d2 100644 --- a/futures-util/src/stream/stream/ready_chunks.rs +++ b/futures-util/src/stream/stream/ready_chunks.rs @@ -20,10 +20,7 @@ pin_project! { } } -impl ReadyChunks -where - St: Stream, -{ +impl ReadyChunks { pub(super) fn new(stream: St, capacity: usize) -> Self { assert!(capacity > 0);