mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
refactor: resolve clippy::needless_borrow
This commit is contained in:
parent
a818b8540a
commit
4a9797276a
@ -802,7 +802,7 @@ impl crate::Adapter<super::Api> for super::Adapter {
|
|||||||
wgt::TextureFormat::Bgra8Unorm,
|
wgt::TextureFormat::Bgra8Unorm,
|
||||||
];
|
];
|
||||||
if surface.supports_srgb() {
|
if surface.supports_srgb() {
|
||||||
formats.extend(&[
|
formats.extend([
|
||||||
wgt::TextureFormat::Rgba8UnormSrgb,
|
wgt::TextureFormat::Rgba8UnormSrgb,
|
||||||
#[cfg(not(target_arch = "wasm32"))]
|
#[cfg(not(target_arch = "wasm32"))]
|
||||||
wgt::TextureFormat::Bgra8UnormSrgb,
|
wgt::TextureFormat::Bgra8UnormSrgb,
|
||||||
|
|||||||
@ -654,17 +654,17 @@ impl crate::Instance<super::Api> for Instance {
|
|||||||
client_ext_str.split_whitespace().collect::<Vec<_>>()
|
client_ext_str.split_whitespace().collect::<Vec<_>>()
|
||||||
);
|
);
|
||||||
|
|
||||||
let wayland_library = if client_ext_str.contains(&"EGL_EXT_platform_wayland") {
|
let wayland_library = if client_ext_str.contains("EGL_EXT_platform_wayland") {
|
||||||
test_wayland_display()
|
test_wayland_display()
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
let x11_display_library = if client_ext_str.contains(&"EGL_EXT_platform_x11") {
|
let x11_display_library = if client_ext_str.contains("EGL_EXT_platform_x11") {
|
||||||
open_x_display()
|
open_x_display()
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
let angle_x11_display_library = if client_ext_str.contains(&"EGL_ANGLE_platform_angle") {
|
let angle_x11_display_library = if client_ext_str.contains("EGL_ANGLE_platform_angle") {
|
||||||
open_x_display()
|
open_x_display()
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
@ -731,7 +731,7 @@ impl crate::Instance<super::Api> for Instance {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if desc.flags.contains(crate::InstanceFlags::VALIDATION)
|
if desc.flags.contains(crate::InstanceFlags::VALIDATION)
|
||||||
&& client_ext_str.contains(&"EGL_KHR_debug")
|
&& client_ext_str.contains("EGL_KHR_debug")
|
||||||
{
|
{
|
||||||
log::info!("Enabling EGL debug output");
|
log::info!("Enabling EGL debug output");
|
||||||
let function: EglDebugMessageControlFun =
|
let function: EglDebugMessageControlFun =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user