Skip to content

Commit b3150a9

Browse files
author
Gal Ben David
committed
Fix linting errors
1 parent edb42cc commit b3150a9

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/git_repository_scanner.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,10 @@ fn get_oids(
148148
revwalk.push_glob(branch_glob_pattern)?;
149149

150150
let mut oids = Vec::new();
151-
for oid in revwalk {
152-
if let Ok(oid) = oid {
153-
if let Ok(commit) = git_repo.find_commit(oid) {
154-
if commit.time().seconds() >= from_timestamp {
155-
oids.push(oid);
156-
}
151+
for oid in revwalk.flatten() {
152+
if let Ok(commit) = git_repo.find_commit(oid) {
153+
if commit.time().seconds() >= from_timestamp {
154+
oids.push(oid);
157155
}
158156
}
159157
}

src/rules_manager.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,18 @@ impl RulesManager {
188188
file_path.ends_with(file_extension_to_skip)
189189
}
190190
) {
191-
false
192-
} else if self.file_paths_to_skip.iter().any(
191+
return false;
192+
}
193+
194+
if self.file_paths_to_skip.iter().any(
193195
|file_path_to_skip| {
194196
file_path.contains(file_path_to_skip)
195197
}
196198
) {
197-
false
198-
} else {
199-
true
199+
return false;
200200
}
201+
202+
true
201203
}
202204

203205
#[text_signature = "(file_path, content, /)"]

0 commit comments

Comments
 (0)