Address clippy::let_and_return
in bevy_utils
(#18480)
# Objective `clippy::let_and_return` fails on Windows. ## Solution Fixed it! ## Testing - CI
This commit is contained in:
parent
4127ac1662
commit
72b4ed05c7
@ -29,8 +29,7 @@ impl<T: Default + Send> Parallel<T> {
|
|||||||
/// If there is no thread-local value, it will be initialized to its default.
|
/// If there is no thread-local value, it will be initialized to its default.
|
||||||
pub fn scope<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
|
pub fn scope<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
|
||||||
let mut cell = self.locals.get_or_default().borrow_mut();
|
let mut cell = self.locals.get_or_default().borrow_mut();
|
||||||
let ret = f(cell.deref_mut());
|
f(cell.deref_mut())
|
||||||
ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Mutably borrows the thread-local value.
|
/// Mutably borrows the thread-local value.
|
||||||
|
Loading…
Reference in New Issue
Block a user