Skip to content

Commit

Permalink
Address clippy::manual_find lint violations
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed May 22, 2023
1 parent 8bd170b commit 76f590d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/unicode/word.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,7 @@ impl<'a> Iterator for Words<'a> {

#[inline]
fn next(&mut self) -> Option<&'a str> {
for word in self.0.by_ref() {
if SIMPLE_WORD_FWD.is_match(word.as_bytes()) {
return Some(word);
}
}
None
self.0.by_ref().find(|&word| SIMPLE_WORD_FWD.is_match(word.as_bytes()))
}
}

Expand Down

0 comments on commit 76f590d

Please sign in to comment.