We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59ba20b commit 5ced8e2Copy full SHA for 5ced8e2
support/linting/src/forbid_as_primitive.rs
@@ -36,10 +36,7 @@ impl<'ast> Visit<'ast> for AsPrimitiveVisitor {
36
}
37
38
fn is_as_primitive(ident: &Ident) -> bool {
39
- match ident.to_string().as_str() {
40
- "as_u32" | "as_u64" | "as_u128" | "as_usize" => true,
41
- _ => false,
42
- }
+ matches!(ident.to_string().as_str(), "as_u32" | "as_u64" | "as_u128" | "as_usize")
43
44
45
#[cfg(test)]
0 commit comments