Skip to content

Commit

Permalink
Ignore manual_find clippy lint
Browse files Browse the repository at this point in the history
    error: manual implementation of `Iterator::find`
      --> impl/src/prop.rs:76:5
       |
    76 | /     for field in fields {
    77 | |         if field.attrs.from.is_some() {
    78 | |             return Some(field);
    79 | |         }
    80 | |     }
    81 | |     None
       | |________^ help: replace with an iterator: `fields.iter().find(|&field| field.attrs.from.is_some())`
       |
       = note: `-D clippy::manual-find` implied by `-D clippy::all`
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find

    error: manual implementation of `Iterator::find`
       --> impl/src/prop.rs:105:5
        |
    105 | /     for field in fields {
    106 | |         if field.is_backtrace() {
    107 | |             return Some(field);
    108 | |         }
    109 | |     }
    110 | |     None
        | |________^ help: replace with an iterator: `fields.iter().find(|&field| field.is_backtrace())`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_find
  • Loading branch information
dtolnay committed Jul 2, 2022
1 parent b338fe6 commit f09771e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
clippy::blocks_in_if_conditions,
clippy::cast_lossless,
clippy::cast_possible_truncation,
clippy::manual_find,
clippy::manual_map,
clippy::map_unwrap_or,
clippy::needless_pass_by_value,
Expand Down

0 comments on commit f09771e

Please sign in to comment.