Skip to content

Commit

Permalink
Ignore manual_let_else pedantic clippy lint
Browse files Browse the repository at this point in the history
    warning: this could be rewritten as `let...else`
       --> impl/src/expand.rs:511:5
        |
    511 | /     let bracketed = match &last.arguments {
    512 | |         PathArguments::AngleBracketed(bracketed) => bracketed,
    513 | |         _ => return None,
    514 | |     };
        | |______^ help: consider writing: `let PathArguments::AngleBracketed(bracketed) = &last.arguments else { return None };`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else

    warning: this could be rewritten as `let...else`
      --> impl/src/fmt.rs:43:13
       |
    43 | /             let next = match read.chars().next() {
    44 | |                 Some(next) => next,
    45 | |                 None => return,
    46 | |             };
       | |______________^ help: consider writing: `let Some(next) = read.chars().next() else { return };`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else

    warning: this could be rewritten as `let...else`
      --> impl/src/fmt.rs:68:17
       |
    68 | /                 let end_spec = match read.find('}') {
    69 | |                     Some(end_spec) => end_spec,
    70 | |                     None => return,
    71 | |                 };
       | |__________________^ help: consider writing: `let Some(end_spec) = read.find('}') else { return };`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else

    warning: this could be rewritten as `let...else`
       --> impl/src/valid.rs:216:13
        |
    216 | /             let bracketed = match &ty.path.segments.last().unwrap().arguments {
    217 | |                 PathArguments::AngleBracketed(bracketed) => bracketed,
    218 | |                 _ => return false,
    219 | |             };
        | |______________^ help: consider writing: `let PathArguments::AngleBracketed(bracketed) = &ty.path.segments.last().unwrap().arguments else { return false };`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_let_else
  • Loading branch information
dtolnay committed Sep 2, 2023
1 parent 080cac5 commit 1f5cbd7
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 @@ -3,6 +3,7 @@
clippy::cast_lossless,
clippy::cast_possible_truncation,
clippy::manual_find,
clippy::manual_let_else,
clippy::manual_map,
clippy::map_unwrap_or,
clippy::needless_pass_by_value,
Expand Down

0 comments on commit 1f5cbd7

Please sign in to comment.