Skip to content

Commit

Permalink
Remove some double trait bounds (#2645)
Browse files Browse the repository at this point in the history
Signed-off-by: TennyZhuang <zty0826@gmail.com>
  • Loading branch information
TennyZhuang authored Sep 15, 2022
1 parent 9a481b0 commit bfd3928
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
6 changes: 1 addition & 5 deletions futures-util/src/stream/stream/buffer_unordered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ where
St: Stream,
St::Item: Future,
{
pub(super) fn new(stream: St, n: Option<usize>) -> Self
where
St: Stream,
St::Item: Future,
{
pub(super) fn new(stream: St, n: Option<usize>) -> Self {
Self {
stream: super::Fuse::new(stream),
in_progress_queue: FuturesUnordered::new(),
Expand Down
5 changes: 1 addition & 4 deletions futures-util/src/stream/stream/chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ pin_project! {
}
}

impl<St: Stream> Chunks<St>
where
St: Stream,
{
impl<St: Stream> Chunks<St> {
pub(super) fn new(stream: St, capacity: usize) -> Self {
assert!(capacity > 0);

Expand Down
5 changes: 1 addition & 4 deletions futures-util/src/stream/stream/ready_chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ pin_project! {
}
}

impl<St: Stream> ReadyChunks<St>
where
St: Stream,
{
impl<St: Stream> ReadyChunks<St> {
pub(super) fn new(stream: St, capacity: usize) -> Self {
assert!(capacity > 0);

Expand Down

0 comments on commit bfd3928

Please sign in to comment.