clippy: fold the series filter into an early return
Clippy 1.91 flags the negated three-term conjunction in series_patches_to_apply; an early return keeps the intent readable without the lint.
This commit is contained in:
1 parent
891bacd055
commit
93f1acf484
1 file changed
+4
-3
+4
-3
@@ -1624,9 +1624,10 @@ fn series_patches_to_apply(series_content: &str, single_debian_patch: bool) -> V
|
|||||||
.lines()
|
.lines()
|
||||||
.map(str::trim)
|
.map(str::trim)
|
||||||
.filter(|entry| {
|
.filter(|entry| {
|
||||||
!entry.is_empty()
|
if entry.is_empty() || entry.starts_with('#') {
|
||||||
&& !entry.starts_with('#')
|
return false;
|
||||||
&& !(single_debian_patch && is_debian_changes(entry))
|
}
|
||||||
|
!(single_debian_patch && is_debian_changes(entry))
|
||||||
})
|
})
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user