1- use crate :: { Future , Sipper , Stream } ;
1+ use crate :: { Core , Future , Stream } ;
22
33use pin_project_lite:: pin_project;
44
@@ -10,16 +10,16 @@ pin_project! {
1010 /// Maps and filters the progress of a [`Sipper`].
1111 ///
1212 /// The result of [`Sipper::filter_with`].
13- pub struct FilterWith <S , Output , Progress , A , F >
13+ pub struct FilterWith <S , F , A >
1414 {
1515 #[ pin]
1616 sipper: S ,
1717 mapper: F ,
18- _types: PhantomData <( Output , Progress , A ) >,
18+ _types: PhantomData <A >,
1919 }
2020}
2121
22- impl < S , Output , Progress , A , F > FilterWith < S , Output , Progress , A , F > {
22+ impl < S , F , A > FilterWith < S , F , A > {
2323 pub ( crate ) fn new ( sipper : S , mapper : F ) -> Self {
2424 Self {
2525 sipper,
@@ -29,22 +29,22 @@ impl<S, Output, Progress, A, F> FilterWith<S, Output, Progress, A, F> {
2929 }
3030}
3131
32- impl < S , Output , Progress , A , F > Future for FilterWith < S , Output , Progress , A , F >
32+ impl < S , F , A > Future for FilterWith < S , F , A >
3333where
34- S : Sipper < Output , Progress > ,
34+ S : Core ,
3535{
36- type Output = Output ;
36+ type Output = < S as Core > :: Output ;
3737
3838 fn poll ( self : Pin < & mut Self > , cx : & mut task:: Context < ' _ > ) -> task:: Poll < Self :: Output > {
3939 let this = self . project ( ) ;
4040 this. sipper . poll ( cx)
4141 }
4242}
4343
44- impl < S , Output , Progress , A , F > Stream for FilterWith < S , Output , Progress , A , F >
44+ impl < S , F , A > Stream for FilterWith < S , F , A >
4545where
46- S : Sipper < Output , Progress > ,
47- F : FnMut ( Progress ) -> Option < A > ,
46+ S : Core ,
47+ F : FnMut ( S :: Progress ) -> Option < A > ,
4848{
4949 type Item = A ;
5050
0 commit comments