nak: fix clippy::manual_while_let_some warnings

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27234>
This commit is contained in:
Karol Herbst
2024-01-24 13:21:48 +01:00
committed by Marge Bot
parent 36cb48d083
commit e7a059794e
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -712,8 +712,7 @@ fn instr_assign_regs_file(
let mut vec_dsts_map_to_killed_srcs = true;
let mut could_trivially_allocate = true;
for vec_dst in vec_dsts.iter_mut().rev() {
while !killed_vecs.is_empty() {
let src = killed_vecs.pop().unwrap();
while let Some(src) = killed_vecs.pop() {
if src.comps() >= vec_dst.comps {
vec_dst.killed = Some(src);
break;
+1 -2
View File
@@ -143,8 +143,7 @@ fn lower_par_copy(pc: OpParCopy, sm: u8) -> MappedInstrs {
ready.push(i);
}
}
while !ready.is_empty() {
let dst_idx = ready.pop().unwrap();
while let Some(dst_idx) = ready.pop() {
if let Some(src_idx) = graph.src(dst_idx) {
let dst = *vals[dst_idx].as_reg().unwrap();
let src = vals[src_idx];