Skip to content

Commit ae68b53

Browse files
committedDec 15, 2020
Code style change
1 parent 9207c6c commit ae68b53

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed
 

Diff for: ‎src/onefetch/repo.rs

+4-13
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,10 @@ impl<'a> Repo<'a> {
2222
let logs: Vec<Commit<'a>> = revwalk
2323
.filter_map(|r| match r {
2424
Err(_) => None,
25-
Ok(r) => {
26-
if let Ok(commit) = repo.find_commit(r) {
27-
if no_merges {
28-
let parents = commit.parents().len();
29-
if parents > 1 {
30-
return None;
31-
}
32-
}
33-
Some(commit)
34-
} else {
35-
None
36-
}
37-
}
25+
Ok(r) => repo
26+
.find_commit(r)
27+
.ok()
28+
.filter(|commit| !(no_merges && commit.parents().len() > 1)),
3829
})
3930
.collect();
4031

0 commit comments

Comments
 (0)