Fix build (#525)

This commit is contained in:
Richard Menzies 2021-02-23 09:59:10 +00:00 committed by GitHub
parent b5411e28a5
commit 301a3a1b87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -32,14 +32,12 @@ impl<'a> LogWalker<'a> {
}
if let Some(ref mut walk) = self.revwalk {
for id in walk {
if let Ok(id) = id {
out.push(id.into());
count += 1;
for id in walk.into_iter().flatten() {
out.push(id.into());
count += 1;
if count == limit {
break;
}
if count == limit {
break;
}
}
}

View File

@ -61,7 +61,7 @@ pub fn get_remotes(repo_path: &str) -> Result<Vec<String>> {
let repo = utils::repo(repo_path)?;
let remotes = repo.remotes()?;
let remotes: Vec<String> =
remotes.iter().filter_map(|s| s).map(String::from).collect();
remotes.iter().flatten().map(String::from).collect();
Ok(remotes)
}