Skip to content

Commit 5ced8e2

Browse files
committed
clippy
1 parent 59ba20b commit 5ced8e2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

support/linting/src/forbid_as_primitive.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ impl<'ast> Visit<'ast> for AsPrimitiveVisitor {
3636
}
3737

3838
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-
}
39+
matches!(ident.to_string().as_str(), "as_u32" | "as_u64" | "as_u128" | "as_usize")
4340
}
4441

4542
#[cfg(test)]

0 commit comments

Comments
 (0)