Skip to content

Commit 380a925

Browse files
committed
Fix clippy
1 parent 34d9768 commit 380a925

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ ignore = "0.4.23"
1111
[dev-dependencies]
1212
pretty_assertions = "1.4.1"
1313

14-
[lint.clippy]
14+
[lints.clippy]
1515
all = "deny"
1616
pedantic = "deny"

src/owners/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ pub fn find_and_print(codeowners: CodeOwners, paths: impl Iterator<Item = String
1717
.try_fold(&mut builder, |acc, op| acc.add_line(None, &op.path))?;
1818

1919
find(builder.build()?, codeowners_by_glob, paths).for_each(|(path, owners)| {
20-
if !owners.is_empty() {
21-
println!("{path}: {}", owners.join(", "));
22-
} else {
20+
if owners.is_empty() {
2321
println!("{path}: No owners found");
22+
} else {
23+
println!("{path}: {}", owners.join(", "));
2424
}
2525
});
2626

src/parser/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ mod tests {
3131

3232
#[test]
3333
fn test_parse() {
34-
let input = r#"
34+
let input = r"
3535
# This is a comment
3636
/src/ codeowner1 codeowner2
3737
/docs/ codeowner3
@@ -40,7 +40,7 @@ mod tests {
4040
/src/utils/ codeowner5
4141
# Final comment
4242
/src/utils/helpers/ codeowner6
43-
"#;
43+
";
4444

4545
let expected: CodeOwners = vec![
4646
("/src/", vec!["codeowner1", "codeowner2"]),
@@ -56,7 +56,7 @@ mod tests {
5656
})
5757
.collect();
5858

59-
assert_eq!(parse(input), expected)
59+
assert_eq!(parse(input), expected);
6060
}
6161

6262
#[test]

0 commit comments

Comments
 (0)