@@ -523,19 +523,19 @@ pub struct GenMut<G, F> {
523
523
524
524
/// A signal that maps from one signal to another
525
525
#[ derive( Clone ) ]
526
- pub struct Map < M , S , Fout > {
526
+ pub struct Map < M , S , F > {
527
527
map : M ,
528
528
signal : S ,
529
- frames : core:: marker:: PhantomData < Fout > ,
529
+ frames : core:: marker:: PhantomData < F > ,
530
530
}
531
531
532
532
/// A signal that iterates two signals in parallel and combines them with a function
533
533
#[ derive( Clone ) ]
534
- pub struct ZipMap < M , S , O , Fout > {
534
+ pub struct ZipMap < M , S , O , F > {
535
535
map : M ,
536
536
this : S ,
537
537
other : O ,
538
- frame : core:: marker:: PhantomData < Fout >
538
+ frame : core:: marker:: PhantomData < F >
539
539
}
540
540
541
541
/// A type that wraps an Iterator and provides a `Signal` implementation for it.
@@ -856,10 +856,10 @@ pub fn gen_mut<G, F>(gen_mut: G) -> GenMut<G, F>
856
856
/// assert_eq!(mapper.next(), [0.5, 0.25]);
857
857
/// }
858
858
/// ```
859
- pub fn map < M , S , Fout > ( signal : S , map : M ) -> Map < M , S , Fout >
860
- where M : FnMut ( < S as Signal > :: Frame ) -> Fout ,
859
+ pub fn map < M , S , F > ( signal : S , map : M ) -> Map < M , S , F >
860
+ where M : FnMut ( S :: Frame ) -> F ,
861
861
S : Signal ,
862
- Fout : Frame ,
862
+ F : Frame ,
863
863
{
864
864
Map {
865
865
map : map,
@@ -881,17 +881,17 @@ pub fn map<M, S, Fout>(signal: S, map: M) -> Map<M, S, Fout>
881
881
/// fn main() {
882
882
/// let frames = signal::gen(|| [0.5]);
883
883
/// let more_frames = signal::gen(|| [0.25]);
884
- /// let mut mapper = signal::zip_map(frames, more_frames, |( f, o) | [f[0], o[0]]);
884
+ /// let mut mapper = signal::zip_map(frames, more_frames, |f, o| [f[0], o[0]]);
885
885
/// assert_eq!(mapper.next(), [0.5, 0.25]);
886
886
/// assert_eq!(mapper.next(), [0.5, 0.25]);
887
887
/// assert_eq!(mapper.next(), [0.5, 0.25]);
888
888
/// }
889
889
/// ```
890
- pub fn zip_map < M , S , O , Fout > ( this : S , other : O , map : M ) -> ZipMap < M , S , O , Fout >
891
- where M : FnMut ( ( < S as Signal > :: Frame , < O as Signal > :: Frame ) ) -> Fout ,
890
+ pub fn zip_map < M , S , O , F > ( this : S , other : O , map : M ) -> ZipMap < M , S , O , F >
891
+ where M : FnMut ( S :: Frame , O :: Frame ) -> F ,
892
892
S : Signal ,
893
893
O : Signal ,
894
- Fout : Frame ,
894
+ F : Frame ,
895
895
{
896
896
ZipMap {
897
897
map : map,
@@ -1186,29 +1186,29 @@ impl<G, F> Signal for GenMut<G, F>
1186
1186
}
1187
1187
1188
1188
1189
- impl < M , S , Fout > Signal for Map < M , S , Fout >
1190
- where M : FnMut ( < S as Signal > :: Frame ) -> Fout ,
1189
+ impl < M , S , F > Signal for Map < M , S , F >
1190
+ where M : FnMut ( S :: Frame ) -> F ,
1191
1191
S : Signal ,
1192
- Fout : Frame ,
1192
+ F : Frame ,
1193
1193
{
1194
- type Frame = Fout ;
1194
+ type Frame = F ;
1195
1195
#[ inline]
1196
1196
fn next ( & mut self ) -> Self :: Frame {
1197
1197
( self . map ) ( self . signal . next ( ) )
1198
1198
}
1199
1199
}
1200
1200
1201
1201
1202
- impl < M , S , O , Fout > Signal for ZipMap < M , S , O , Fout >
1203
- where M : FnMut ( ( < S as Signal > :: Frame , < O as Signal > :: Frame ) ) -> Fout ,
1202
+ impl < M , S , O , F > Signal for ZipMap < M , S , O , F >
1203
+ where M : FnMut ( S :: Frame , O :: Frame ) -> F ,
1204
1204
S : Signal ,
1205
1205
O : Signal ,
1206
- Fout : Frame ,
1206
+ F : Frame ,
1207
1207
{
1208
- type Frame = Fout ;
1208
+ type Frame = F ;
1209
1209
#[ inline]
1210
1210
fn next ( & mut self ) -> Self :: Frame {
1211
- ( self . map ) ( ( self . this . next ( ) , self . other . next ( ) ) )
1211
+ ( self . map ) ( self . this . next ( ) , self . other . next ( ) )
1212
1212
}
1213
1213
}
1214
1214
0 commit comments