Skip to content

Commit

Permalink
Resolve match_wildcard_for_single_variants pedantic clippy lint
Browse files Browse the repository at this point in the history
    warning: wildcard matches only a single variant and will also match any future added variants
      --> gen/src/error.rs:43:13
       |
    43 |             _ => None,
       |             ^ help: try this: `Error::NoBridgeMod`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
       = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic`
  • Loading branch information
dtolnay committed Jul 6, 2023
1 parent 669a720 commit a6c1419
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion gen/build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
clippy::match_bool,
clippy::match_on_vec_items,
clippy::match_same_arms,
clippy::match_wildcard_for_single_variants,
clippy::module_name_repetitions,
clippy::needless_doctest_main,
clippy::needless_pass_by_value,
Expand Down
1 change: 0 additions & 1 deletion gen/cmd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
clippy::match_bool,
clippy::match_on_vec_items,
clippy::match_same_arms,
clippy::match_wildcard_for_single_variants,
clippy::module_name_repetitions,
clippy::needless_pass_by_value,
clippy::new_without_default,
Expand Down
1 change: 0 additions & 1 deletion gen/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
clippy::match_bool,
clippy::match_on_vec_items,
clippy::match_same_arms,
clippy::match_wildcard_for_single_variants,
clippy::missing_errors_doc,
clippy::module_name_repetitions,
clippy::must_use_candidate,
Expand Down
2 changes: 1 addition & 1 deletion gen/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl StdError for Error {
Error::Fs(err) => err.source(),
Error::Utf8(_, err) => Some(err),
Error::Syn(err) => err.source(),
_ => None,
Error::NoBridgeMod => None,
}
}
}
Expand Down

0 comments on commit a6c1419

Please sign in to comment.