Skip to content

Commit bf0ecb4

Browse files
committed
lint
1 parent c1c3101 commit bf0ecb4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

codeowners-cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl Cli {
7474
.map_err(|e| anyhow!("reading {:?}: {}", paths_from_file, e))?;
7575
let reader = std::io::BufReader::new(file);
7676
Ok(Box::new(
77-
reader.lines().filter_map(|l| l.ok()).map(PathBuf::from),
77+
reader.lines().map_while(Result::ok).map(PathBuf::from),
7878
))
7979
} else {
8080
Ok(self.root_paths().into_iter().map(walk_files).fold(

codeowners-rs/src/ruleset.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ impl RuleSet {
4848
/// Returns the owners for the given path, or `None` if no rules match the
4949
/// path or the matching rule has no owners.
5050
pub fn owners(&self, path: impl AsRef<Path>) -> Option<&[Owner]> {
51-
return self.matching_rule(path).and_then(|rule| {
51+
self.matching_rule(path).and_then(|rule| {
5252
if rule.owners.is_empty() {
5353
None
5454
} else {
5555
Some(rule.owners.as_ref())
5656
}
57-
});
57+
})
5858
}
5959

6060
/// Returns the all rules that match the given path along with their indices.

0 commit comments

Comments
 (0)