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,
|
||||
];
|
||||
if surface.supports_srgb() {
|
||||
formats.extend(&[
|
||||
formats.extend([
|
||||
wgt::TextureFormat::Rgba8UnormSrgb,
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
wgt::TextureFormat::Bgra8UnormSrgb,
|
||||
|
||||
@ -654,17 +654,17 @@ impl crate::Instance<super::Api> for Instance {
|
||||
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()
|
||||
} else {
|
||||
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()
|
||||
} else {
|
||||
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()
|
||||
} else {
|
||||
None
|
||||
@ -731,7 +731,7 @@ impl crate::Instance<super::Api> for Instance {
|
||||
};
|
||||
|
||||
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");
|
||||
let function: EglDebugMessageControlFun =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user