chore: Fix more unused_qualifications (#5746)

This commit is contained in:
Bruce Mitchener 2024-05-26 13:37:53 +07:00 committed by GitHub
parent 7368e5107c
commit b4abd65659
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 13 deletions

View File

@ -1226,17 +1226,15 @@ impl crate::Surface for Surface {
let native_window_ptr = match (self.wsi.kind, self.raw_window_handle) { let native_window_ptr = match (self.wsi.kind, self.raw_window_handle) {
(WindowKind::Unknown | WindowKind::X11, Rwh::Xlib(handle)) => { (WindowKind::Unknown | WindowKind::X11, Rwh::Xlib(handle)) => {
temp_xlib_handle = handle.window; temp_xlib_handle = handle.window;
&mut temp_xlib_handle as *mut _ as *mut std::ffi::c_void &mut temp_xlib_handle as *mut _ as *mut ffi::c_void
}
(WindowKind::AngleX11, Rwh::Xlib(handle)) => {
handle.window as *mut std::ffi::c_void
} }
(WindowKind::AngleX11, Rwh::Xlib(handle)) => handle.window as *mut ffi::c_void,
(WindowKind::Unknown | WindowKind::X11, Rwh::Xcb(handle)) => { (WindowKind::Unknown | WindowKind::X11, Rwh::Xcb(handle)) => {
temp_xcb_handle = handle.window; temp_xcb_handle = handle.window;
&mut temp_xcb_handle as *mut _ as *mut std::ffi::c_void &mut temp_xcb_handle as *mut _ as *mut ffi::c_void
} }
(WindowKind::AngleX11, Rwh::Xcb(handle)) => { (WindowKind::AngleX11, Rwh::Xcb(handle)) => {
handle.window.get() as *mut std::ffi::c_void handle.window.get() as *mut ffi::c_void
} }
(WindowKind::Unknown, Rwh::AndroidNdk(handle)) => { (WindowKind::Unknown, Rwh::AndroidNdk(handle)) => {
handle.a_native_window.as_ptr() handle.a_native_window.as_ptr()
@ -1252,9 +1250,9 @@ impl crate::Surface for Surface {
window window
} }
#[cfg(Emscripten)] #[cfg(Emscripten)]
(WindowKind::Unknown, Rwh::Web(handle)) => handle.id as *mut std::ffi::c_void, (WindowKind::Unknown, Rwh::Web(handle)) => handle.id as *mut ffi::c_void,
(WindowKind::Unknown, Rwh::Win32(handle)) => { (WindowKind::Unknown, Rwh::Win32(handle)) => {
handle.hwnd.get() as *mut std::ffi::c_void handle.hwnd.get() as *mut ffi::c_void
} }
(WindowKind::Unknown, Rwh::AppKit(handle)) => { (WindowKind::Unknown, Rwh::AppKit(handle)) => {
#[cfg(not(target_os = "macos"))] #[cfg(not(target_os = "macos"))]

View File

@ -82,11 +82,9 @@ impl crate::Adapter for super::Adapter {
// https://developer.apple.com/documentation/metal/mtlreadwritetexturetier/mtlreadwritetexturetier1?language=objc // https://developer.apple.com/documentation/metal/mtlreadwritetexturetier/mtlreadwritetexturetier1?language=objc
// https://developer.apple.com/documentation/metal/mtlreadwritetexturetier/mtlreadwritetexturetier2?language=objc // https://developer.apple.com/documentation/metal/mtlreadwritetexturetier/mtlreadwritetexturetier2?language=objc
let (read_write_tier1_if, read_write_tier2_if) = match pc.read_write_texture_tier { let (read_write_tier1_if, read_write_tier2_if) = match pc.read_write_texture_tier {
metal::MTLReadWriteTextureTier::TierNone => (Tfc::empty(), Tfc::empty()), MTLReadWriteTextureTier::TierNone => (Tfc::empty(), Tfc::empty()),
metal::MTLReadWriteTextureTier::Tier1 => (Tfc::STORAGE_READ_WRITE, Tfc::empty()), MTLReadWriteTextureTier::Tier1 => (Tfc::STORAGE_READ_WRITE, Tfc::empty()),
metal::MTLReadWriteTextureTier::Tier2 => { MTLReadWriteTextureTier::Tier2 => (Tfc::STORAGE_READ_WRITE, Tfc::STORAGE_READ_WRITE),
(Tfc::STORAGE_READ_WRITE, Tfc::STORAGE_READ_WRITE)
}
}; };
let msaa_count = pc.sample_count_mask; let msaa_count = pc.sample_count_mask;