use first instead of get(0)
Co-authored-by: Timo <30553356+y21@users.noreply.github.com>
This commit is contained in:
parent
b3e262acfd
commit
0433e458da
@ -167,7 +167,7 @@ fn check_variant(cx: &LateContext<'_>, threshold: u64, def: &EnumDef<'_>, item_n
|
||||
return;
|
||||
}
|
||||
|
||||
let first = match &def.variants.get(0) {
|
||||
let first = match def.variants.first() {
|
||||
Some(variant) => variant.ident.name.as_str(),
|
||||
None => return,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user