From e4e4d1ea0ed811ec202242b3d228a84edea6a761 Mon Sep 17 00:00:00 2001 From: Nathan Voglsam Date: Wed, 17 Jan 2024 23:56:51 +1100 Subject: [PATCH] Fix 'extra' mut and incorrect android implementation of raw_display_handle --- src/sdl2/raw_window_handle.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/sdl2/raw_window_handle.rs b/src/sdl2/raw_window_handle.rs index 66babfc344..fb88fc5d48 100644 --- a/src/sdl2/raw_window_handle.rs +++ b/src/sdl2/raw_window_handle.rs @@ -156,7 +156,7 @@ unsafe impl HasRawDisplayHandle for Window { SDL_SYSWM_WINDOWS | SDL_SYSWM_WINRT => { use self::raw_window_handle::WindowsDisplayHandle; - let mut handle = WindowsDisplayHandle::empty(); + let handle = WindowsDisplayHandle::empty(); RawDisplayHandle::Windows(handle) } @@ -200,7 +200,7 @@ unsafe impl HasRawDisplayHandle for Window { SDL_SYSWM_UIKIT => { use self::raw_window_handle::UiKitDisplayHandle; - let mut handle = UiKitDisplayHandle::empty(); + let handle = UiKitDisplayHandle::empty(); RawDisplayHandle::UiKit(handle) } @@ -208,9 +208,7 @@ unsafe impl HasRawDisplayHandle for Window { SDL_SYSWM_ANDROID => { use self::raw_window_handle::AndroidDisplayHandle; - let mut handle = AndroidDisplayHandle::empty(); - handle.a_native_window = - unsafe { wm_info.info.android }.window as *mut libc::c_void; + let handle = AndroidDisplayHandle::empty(); RawDisplayHandle::Android(handle) }