File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,12 @@ impl<'a> LogWalker<'a> {
32
32
}
33
33
34
34
if let Some ( ref mut walk) = self . revwalk {
35
- for id in walk {
36
- if let Ok ( id) = id {
37
- out. push ( id. into ( ) ) ;
38
- count += 1 ;
39
-
40
- if count == limit {
41
- break ;
42
- }
35
+ for id in walk. into_iter ( ) . flatten ( ) {
36
+ out. push ( id. into ( ) ) ;
37
+ count += 1 ;
38
+
39
+ if count == limit {
40
+ break ;
43
41
}
44
42
}
45
43
}
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ pub fn get_remotes(repo_path: &str) -> Result<Vec<String>> {
61
61
let repo = utils:: repo ( repo_path) ?;
62
62
let remotes = repo. remotes ( ) ?;
63
63
let remotes: Vec < String > =
64
- remotes. iter ( ) . filter_map ( |s| s ) . map ( String :: from) . collect ( ) ;
64
+ remotes. iter ( ) . flatten ( ) . map ( String :: from) . collect ( ) ;
65
65
66
66
Ok ( remotes)
67
67
}
You can’t perform that action at this time.
0 commit comments