From ab2e71124a27045c9a65b27c4a0e2644d6baf7c7 Mon Sep 17 00:00:00 2001 From: TennyZhuang Date: Fri, 16 Sep 2022 01:38:20 +0800 Subject: [PATCH] Remove some double trait bounds (#2645) 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 d64c142b41..91b0f6bcce 100644 --- a/futures-util/src/stream/stream/buffer_unordered.rs +++ b/futures-util/src/stream/stream/buffer_unordered.rs @@ -41,11 +41,7 @@ where St: Stream, St::Item: Future, { - pub(super) fn new(stream: St, n: usize) -> Self - where - St: Stream, - St::Item: Future, - { + pub(super) fn new(stream: St, n: usize) -> 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 385b9b7170..2a71ebc6cc 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 93efed9d5d..49116d49e7 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);