Skip to content

Commit

Permalink
Merge pull request #450 from cakebaker/find_fix_clippy_warning
Browse files Browse the repository at this point in the history
find: use array instead of closure
  • Loading branch information
sylvestre authored Sep 6, 2024
2 parents db8e265 + b4f22f0 commit 8fc5ddb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/find/matchers/printf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ impl FormatStringParser<'_> {
pub fn parse(&mut self) -> Result<FormatString, Box<dyn Error>> {
let mut components = vec![];

while let Some(i) = self.string.find(|c| c == '%' || c == '\\') {
while let Some(i) = self.string.find(['%', '\\']) {
if i > 0 {
// safe to unwrap: i is an index into the string, so it cannot
// be any shorter.
Expand Down

0 comments on commit 8fc5ddb

Please # to comment.