Skip to content

Commit c0f1860

Browse files
committed
run ignored test
1 parent 6c82372 commit c0f1860

File tree

3 files changed

+16
-30
lines changed

3 files changed

+16
-30
lines changed

src/stream/stream/max.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use core::cmp::{Ord, Ordering};
2-
use core::marker::PhantomData;
3-
use core::pin::Pin;
42
use core::future::Future;
3+
use core::pin::Pin;
54

65
use pin_project_lite::pin_project;
76

@@ -11,29 +10,23 @@ use crate::task::{Context, Poll};
1110
pin_project! {
1211
#[doc(hidden)]
1312
#[allow(missing_debug_implementations)]
14-
pub struct MaxFuture<S, F, T> {
13+
pub struct MaxFuture<S, T> {
1514
#[pin]
1615
stream: S,
17-
_compare: PhantomData<F>,
1816
max: Option<T>,
1917
}
2018
}
2119

22-
impl<S, F, T> MaxFuture<S, F, T> {
20+
impl<S, T> MaxFuture<S, T> {
2321
pub(super) fn new(stream: S) -> Self {
24-
Self {
25-
stream,
26-
_compare: PhantomData,
27-
max: None,
28-
}
22+
Self { stream, max: None }
2923
}
3024
}
3125

32-
impl<S, F> Future for MaxFuture<S, F, S::Item>
26+
impl<S> Future for MaxFuture<S, S::Item>
3327
where
3428
S: Stream,
3529
S::Item: Ord,
36-
F: FnMut(&S::Item, &S::Item) -> Ordering,
3730
{
3831
type Output = Option<S::Item>;
3932

src/stream/stream/min.rs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use core::cmp::{Ord, Ordering};
2-
use core::marker::PhantomData;
3-
use core::pin::Pin;
42
use core::future::Future;
3+
use core::pin::Pin;
54

65
use pin_project_lite::pin_project;
76

@@ -11,29 +10,23 @@ use crate::task::{Context, Poll};
1110
pin_project! {
1211
#[doc(hidden)]
1312
#[allow(missing_debug_implementations)]
14-
pub struct MinFuture<S, F, T> {
13+
pub struct MinFuture<S, T> {
1514
#[pin]
1615
stream: S,
17-
_compare: PhantomData<F>,
1816
min: Option<T>,
1917
}
2018
}
2119

22-
impl<S, F, T> MinFuture<S, F, T> {
20+
impl<S, T> MinFuture<S, T> {
2321
pub(super) fn new(stream: S) -> Self {
24-
Self {
25-
stream,
26-
_compare: PhantomData,
27-
min: None,
28-
}
22+
Self { stream, min: None }
2923
}
3024
}
3125

32-
impl<S, F> Future for MinFuture<S, F, S::Item>
26+
impl<S> Future for MinFuture<S, S::Item>
3327
where
3428
S: Stream,
3529
S::Item: Ord,
36-
F: FnMut(&S::Item, &S::Item) -> Ordering,
3730
{
3831
type Output = Option<S::Item>;
3932

src/stream/stream/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,12 +1028,12 @@ extension_trait! {
10281028
# }) }
10291029
```
10301030
"#]
1031-
fn max<F>(
1031+
fn max(
10321032
self,
1033-
) -> impl Future<Output = Option<Self::Item>> [MaxFuture<Self, F, Self::Item>]
1033+
) -> impl Future<Output = Option<Self::Item>> [MaxFuture<Self, Self::Item>]
10341034
where
10351035
Self: Sized,
1036-
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
1036+
Self::Item: Ord,
10371037
{
10381038
MaxFuture::new(self)
10391039
}
@@ -1061,12 +1061,12 @@ extension_trait! {
10611061
# }) }
10621062
```
10631063
"#]
1064-
fn min<F>(
1064+
fn min(
10651065
self,
1066-
) -> impl Future<Output = Option<Self::Item>> [MinFuture<Self, F, Self::Item>]
1066+
) -> impl Future<Output = Option<Self::Item>> [MinFuture<Self, Self::Item>]
10671067
where
10681068
Self: Sized,
1069-
F: FnMut(&Self::Item, &Self::Item) -> Ordering,
1069+
Self::Item: Ord,
10701070
{
10711071
MinFuture::new(self)
10721072
}

0 commit comments

Comments
 (0)