Skip to content

Commit

Permalink
Use the only variant left instead of a wildcard
Browse files Browse the repository at this point in the history
Co-authored-by: Philipp Krones <hello@philkrones.com>
  • Loading branch information
ebroto and flip1995 authored May 1, 2020
1 parent 42b0b47 commit 240065b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/manual_non_exhaustive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fn check_manual_non_exhaustive_struct(cx: &EarlyContext<'_>, item: &Item, data:
let delimiter = match data {
VariantData::Struct(..) => '{',
VariantData::Tuple(..) => '(',
_ => unreachable!("`VariantData::Unit` is already handled above"),
VariantData::Unit => unreachable!("`VariantData::Unit` is already handled above"),
};

cx.sess.source_map().span_until_char(item.span, delimiter)
Expand Down

0 comments on commit 240065b

Please sign in to comment.