Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Jan 8, 2025
1 parent f5d3330 commit 8017305
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions crates/libs/bindgen/src/writer/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
_ => {}
}
}

Expand Down

0 comments on commit 8017305

Please sign in to comment.