Skip to content

Commit

Permalink
chore: Fix more unused_qualifications (#5746)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored May 26, 2024
1 parent 7368e51 commit b4abd65
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
14 changes: 6 additions & 8 deletions wgpu-hal/src/gles/egl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1226,17 +1226,15 @@ impl crate::Surface for Surface {
let native_window_ptr = match (self.wsi.kind, self.raw_window_handle) {
(WindowKind::Unknown | WindowKind::X11, Rwh::Xlib(handle)) => {
temp_xlib_handle = handle.window;
&mut temp_xlib_handle as *mut _ as *mut std::ffi::c_void
}
(WindowKind::AngleX11, Rwh::Xlib(handle)) => {
handle.window 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 ffi::c_void,
(WindowKind::Unknown | WindowKind::X11, Rwh::Xcb(handle)) => {
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)) => {
handle.window.get() as *mut std::ffi::c_void
handle.window.get() as *mut ffi::c_void
}
(WindowKind::Unknown, Rwh::AndroidNdk(handle)) => {
handle.a_native_window.as_ptr()
Expand All @@ -1252,9 +1250,9 @@ impl crate::Surface for Surface {
window
}
#[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)) => {
handle.hwnd.get() as *mut std::ffi::c_void
handle.hwnd.get() as *mut ffi::c_void
}
(WindowKind::Unknown, Rwh::AppKit(handle)) => {
#[cfg(not(target_os = "macos"))]
Expand Down
8 changes: 3 additions & 5 deletions wgpu-hal/src/metal/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/mtlreadwritetexturetier2?language=objc
let (read_write_tier1_if, read_write_tier2_if) = match pc.read_write_texture_tier {
metal::MTLReadWriteTextureTier::TierNone => (Tfc::empty(), Tfc::empty()),
metal::MTLReadWriteTextureTier::Tier1 => (Tfc::STORAGE_READ_WRITE, Tfc::empty()),
metal::MTLReadWriteTextureTier::Tier2 => {
(Tfc::STORAGE_READ_WRITE, Tfc::STORAGE_READ_WRITE)
}
MTLReadWriteTextureTier::TierNone => (Tfc::empty(), Tfc::empty()),
MTLReadWriteTextureTier::Tier1 => (Tfc::STORAGE_READ_WRITE, Tfc::empty()),
MTLReadWriteTextureTier::Tier2 => (Tfc::STORAGE_READ_WRITE, Tfc::STORAGE_READ_WRITE),
};
let msaa_count = pc.sample_count_mask;

Expand Down

0 comments on commit b4abd65

Please sign in to comment.