Skip to content

Commit

Permalink
refactor: resolve clippy::needless_borrow
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler authored and jimblandy committed Nov 8, 2022
1 parent a818b85 commit 4a97972
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion wgpu-hal/src/gles/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions wgpu-hal/src/gles/egl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 =
Expand Down

0 comments on commit 4a97972

Please sign in to comment.