Skip to content

Commit 350c17d

Browse files
ebrotoflip1995
andcommitted
Use the only variant left instead of a wildcard
Co-authored-by: Philipp Krones <[email protected]>
1 parent 42b0b47 commit 350c17d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/manual_non_exhaustive.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ fn check_manual_non_exhaustive_struct(cx: &EarlyContext<'_>, item: &Item, data:
133133
let delimiter = match data {
134134
VariantData::Struct(..) => '{',
135135
VariantData::Tuple(..) => '(',
136-
_ => unreachable!("`VariantData::Unit` is already handled above"),
136+
VariantData::Unit(_) => unreachable!("`VariantData::Unit` is already handled above"),
137137
};
138138

139139
cx.sess.source_map().span_until_char(item.span, delimiter)

0 commit comments

Comments
 (0)