Fix unnecessary-mut-passed lint (#36490)

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-08-19 16:20:01 +02:00 committed by GitHub
parent e3b593efbd
commit c4083b9b63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 103 additions and 104 deletions

View file

@ -368,7 +368,7 @@ impl App {
}),
});
init_app_menus(platform.as_ref(), &mut app.borrow_mut());
init_app_menus(platform.as_ref(), &app.borrow());
platform.on_keyboard_layout_change(Box::new({
let app = Rc::downgrade(&app);
@ -1332,7 +1332,7 @@ impl App {
}
inner(
&mut self.keystroke_observers,
&self.keystroke_observers,
Box::new(move |event, window, cx| {
f(event, window, cx);
true
@ -1358,7 +1358,7 @@ impl App {
}
inner(
&mut self.keystroke_interceptors,
&self.keystroke_interceptors,
Box::new(move |event, window, cx| {
f(event, window, cx);
true

View file

@ -472,7 +472,7 @@ impl<'a, T: 'static> Context<'a, T> {
let view = self.weak_entity();
inner(
&mut self.keystroke_observers,
&self.keystroke_observers,
Box::new(move |event, window, cx| {
if let Some(view) = view.upgrade() {
view.update(cx, |view, cx| f(view, event, window, cx));

View file

@ -219,7 +219,7 @@ impl TestAppContext {
let mut cx = self.app.borrow_mut();
// Some tests rely on the window size matching the bounds of the test display
let bounds = Bounds::maximized(None, &mut cx);
let bounds = Bounds::maximized(None, &cx);
cx.open_window(
WindowOptions {
window_bounds: Some(WindowBounds::Windowed(bounds)),
@ -233,7 +233,7 @@ impl TestAppContext {
/// Adds a new window with no content.
pub fn add_empty_window(&mut self) -> &mut VisualTestContext {
let mut cx = self.app.borrow_mut();
let bounds = Bounds::maximized(None, &mut cx);
let bounds = Bounds::maximized(None, &cx);
let window = cx
.open_window(
WindowOptions {
@ -261,7 +261,7 @@ impl TestAppContext {
V: 'static + Render,
{
let mut cx = self.app.borrow_mut();
let bounds = Bounds::maximized(None, &mut cx);
let bounds = Bounds::maximized(None, &cx);
let window = cx
.open_window(
WindowOptions {