File tree 4 files changed +6
-26
lines changed
4 files changed +6
-26
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use std::pin::Pin;
2
2
3
3
use crate :: prelude:: * ;
4
4
use crate :: stream:: { FromStream , IntoStream } ;
5
- use crate :: utils :: identity;
5
+ use std :: convert :: identity;
6
6
7
7
impl < T , V > FromStream < Option < T > > for Option < V >
8
8
where
33
33
. collect ( )
34
34
. await ;
35
35
36
- if found_none {
37
- None
38
- } else {
39
- Some ( out)
40
- }
36
+ if found_none { None } else { Some ( out) }
41
37
} )
42
38
}
43
39
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use std::pin::Pin;
2
2
3
3
use crate :: prelude:: * ;
4
4
use crate :: stream:: { Product , Stream } ;
5
- use crate :: utils :: identity;
5
+ use std :: convert :: identity;
6
6
7
7
impl < T , U > Product < Option < U > > for Option < T >
8
8
where
57
57
)
58
58
. await ;
59
59
60
- if found_none {
61
- None
62
- } else {
63
- Some ( out)
64
- }
60
+ if found_none { None } else { Some ( out) }
65
61
} )
66
62
}
67
63
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ use std::pin::Pin;
2
2
3
3
use crate :: prelude:: * ;
4
4
use crate :: stream:: { Stream , Sum } ;
5
- use crate :: utils :: identity;
5
+ use std :: convert :: identity;
6
6
7
7
impl < T , U > Sum < Option < U > > for Option < T >
8
8
where
52
52
)
53
53
. await ;
54
54
55
- if found_none {
56
- None
57
- } else {
58
- Some ( out)
59
- }
55
+ if found_none { None } else { Some ( out) }
60
56
} )
61
57
}
62
58
}
Original file line number Diff line number Diff line change @@ -52,14 +52,6 @@ pub fn random(n: u32) -> u32 {
52
52
} )
53
53
}
54
54
55
- /// Returns given argument without changes.
56
- #[ allow( dead_code) ]
57
- #[ doc( hidden) ]
58
- #[ inline( always) ]
59
- pub ( crate ) fn identity < T > ( arg : T ) -> T {
60
- arg
61
- }
62
-
63
55
/// Add additional context to errors
64
56
pub ( crate ) trait Context {
65
57
fn context ( self , message : impl Fn ( ) -> String ) -> Self ;
You can’t perform that action at this time.
0 commit comments