Skip to content

Commit 301a3a1

Browse files
authored
Fix build (#525)
1 parent b5411e2 commit 301a3a1

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

asyncgit/src/sync/logwalker.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@ impl<'a> LogWalker<'a> {
3232
}
3333

3434
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;
4341
}
4442
}
4543
}

asyncgit/src/sync/remotes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub fn get_remotes(repo_path: &str) -> Result<Vec<String>> {
6161
let repo = utils::repo(repo_path)?;
6262
let remotes = repo.remotes()?;
6363
let remotes: Vec<String> =
64-
remotes.iter().filter_map(|s| s).map(String::from).collect();
64+
remotes.iter().flatten().map(String::from).collect();
6565

6666
Ok(remotes)
6767
}

0 commit comments

Comments
 (0)