From 97a7592557791d7fc5c2be3f594960bbab7252a6 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sat, 4 Oct 2025 16:35:29 +0200 Subject: [PATCH] nak: drop redundant closure Part-of: --- src/nouveau/compiler/nak/opt_instr_sched_postpass.rs | 3 +-- src/nouveau/compiler/nak/sm32.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/nouveau/compiler/nak/opt_instr_sched_postpass.rs b/src/nouveau/compiler/nak/opt_instr_sched_postpass.rs index 1e1909d11a0..8f5ce6be000 100644 --- a/src/nouveau/compiler/nak/opt_instr_sched_postpass.rs +++ b/src/nouveau/compiler/nak/opt_instr_sched_postpass.rs @@ -211,8 +211,7 @@ fn sched_buffer( let (new_order, cycle_count) = generate_order(&mut g, init_ready_list); // Apply the new instruction order - let mut instrs: Vec> = - instrs.into_iter().map(|instr| Some(instr)).collect(); + let mut instrs: Vec> = instrs.into_iter().map(Some).collect(); let instrs = new_order.into_iter().rev().map(move |i| { std::mem::take(&mut instrs[i]).expect("Instruction scheduled twice") }); diff --git a/src/nouveau/compiler/nak/sm32.rs b/src/nouveau/compiler/nak/sm32.rs index 27a2c6a5563..4543c7edc18 100644 --- a/src/nouveau/compiler/nak/sm32.rs +++ b/src/nouveau/compiler/nak/sm32.rs @@ -358,7 +358,7 @@ impl SM32Encoder<'_> { RRR, } let src1 = AluSrc::from_src(src1); - let src2 = src2.map(|s| AluSrc::from_src(s)); + let src2 = src2.map(AluSrc::from_src); if let Some(dst) = dst { self.set_dst(dst);