From 72b4ed05c74bd04db266791c5b3e442de89377c3 Mon Sep 17 00:00:00 2001 From: Zachary Harrold Date: Sat, 22 Mar 2025 22:44:49 +1100 Subject: [PATCH] Address `clippy::let_and_return` in `bevy_utils` (#18480) # Objective `clippy::let_and_return` fails on Windows. ## Solution Fixed it! ## Testing - CI --- crates/bevy_utils/src/parallel_queue.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/bevy_utils/src/parallel_queue.rs b/crates/bevy_utils/src/parallel_queue.rs index f9c4c66ca0..861d17bcf2 100644 --- a/crates/bevy_utils/src/parallel_queue.rs +++ b/crates/bevy_utils/src/parallel_queue.rs @@ -29,8 +29,7 @@ impl Parallel { /// If there is no thread-local value, it will be initialized to its default. pub fn scope(&self, f: impl FnOnce(&mut T) -> R) -> R { let mut cell = self.locals.get_or_default().borrow_mut(); - let ret = f(cell.deref_mut()); - ret + f(cell.deref_mut()) } /// Mutably borrows the thread-local value.