Skip to content

Commit 9c68fe9

Browse files
committed
fix: Resolve clippy diagnostics
1 parent ce20664 commit 9c68fe9

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

asyncgit/src/sync/revwalk.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ use git2::{Commit, Oid};
55

66
use super::{repo, CommitId, RepoPath};
77

8-
/// Performs a Git revision walk on `repo_path`, optionally bounded by `start` and `end` commits,
9-
/// sorted according to `sort`. The revwalk iterator bound by repository's lifetime is exposed through
10-
/// the `iter_fn`.
11-
///
8+
/// Performs a Git revision walk.
129
///
10+
/// The revwalk is optionally bounded by `start` and `end` commits, sorted according to `sort`.
11+
/// The revwalk iterator bound by repository's lifetime is exposed through the `iter_fn`.
1312
pub fn revwalk<R>(
1413
repo_path: &RepoPath,
1514
start: Bound<&CommitId>,
@@ -31,10 +30,13 @@ pub fn revwalk<R>(
3130
if let Some(e) = end {
3231
revwalk.push(e.id())?;
3332
}
34-
let ret = iter_fn(&mut revwalk.map(|r| {
35-
r.map_err(|x| crate::Error::Generic(x.to_string()))
36-
}));
37-
ret
33+
{
34+
#![allow(clippy::let_and_return)]
35+
let ret = iter_fn(&mut revwalk.map(|r| {
36+
r.map_err(|x| crate::Error::Generic(x.to_string()))
37+
}));
38+
ret
39+
}
3840
}
3941

4042
fn resolve<'r>(

0 commit comments

Comments
 (0)