nak: fix clippy::single_match warnings

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
This commit is contained in:
Karol Herbst
2024-01-24 13:35:41 +01:00
committed by Marge Bot
parent cce0a42dcd
commit c7ffbd8759
2 changed files with 5 additions and 11 deletions

View File

@@ -1202,11 +1202,8 @@ impl Shader {
live = SimpleLiveness::for_function(f);
max_live = live.calc_max_live(f);
match file {
RegFile::Bar => {
tmp_gprs = max(tmp_gprs, 2);
}
_ => (),
if file == RegFile::Bar {
tmp_gprs = max(tmp_gprs, 2);
}
}
}

View File

@@ -2088,13 +2088,10 @@ impl Shader {
for b in &func.blocks {
labels.insert(b.label, ip);
for instr in &b.instrs {
match &instr.op {
Op::Nop(op) => {
if let Some(label) = op.label {
labels.insert(label, ip);
}
if let Op::Nop(op) = &instr.op {
if let Some(label) = op.label {
labels.insert(label, ip);
}
_ => (),
}
ip += 4;
}