From 8017305967b41c2fea7963cf9e743f42ec72fded Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Wed, 8 Jan 2025 11:19:42 -0600 Subject: [PATCH] clippy --- crates/libs/bindgen/src/writer/cfg.rs | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/crates/libs/bindgen/src/writer/cfg.rs b/crates/libs/bindgen/src/writer/cfg.rs index 43055a66ce..556cdd33d3 100644 --- a/crates/libs/bindgen/src/writer/cfg.rs +++ b/crates/libs/bindgen/src/writer/cfg.rs @@ -12,22 +12,19 @@ impl Writer { let mut arches = BTreeSet::new(); for attribute in row.attributes() { - match attribute.name() { - "SupportedArchitectureAttribute" => { - if let Some((_, Value::I32(value))) = attribute.args().first() { - if value & 1 == 1 { - arches.insert("x86"); - } - if value & 2 == 2 { - arches.insert("x86_64"); - arches.insert("arm64ec"); - } - if value & 4 == 4 { - arches.insert("aarch64"); - } + if attribute.name() == "SupportedArchitectureAttribute" { + if let Some((_, Value::I32(value))) = attribute.args().first() { + if value & 1 == 1 { + arches.insert("x86"); + } + if value & 2 == 2 { + arches.insert("x86_64"); + arches.insert("arm64ec"); + } + if value & 4 == 4 { + arches.insert("aarch64"); } } - _ => {} } }