Skip to content

Commit b722c5f

Browse files
committed
clippy::manual_find
1 parent ac4d7df commit b722c5f

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/handlers/mentions.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,9 @@ pub(super) async fn handle_input(
155155
}
156156

157157
fn patch_adds(patch: &str, needle: &str) -> bool {
158-
for line in patch.lines() {
159-
if !line.starts_with("+++") && line.starts_with('+') {
160-
if line.contains(needle) {
161-
return true;
162-
}
163-
}
164-
}
165-
166-
false
158+
patch
159+
.lines()
160+
.any(|line| !line.starts_with("+++") && line.starts_with('+') && line.contains(needle))
167161
}
168162

169163
#[cfg(test)]

0 commit comments

Comments
 (0)