From 681a023b04b513b3283d85fe157d6b38987bc42e Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Tue, 18 Feb 2025 21:15:00 +0200 Subject: Fix clippy warnings surfaced by the merge Pre-existing issues in the uncommitted rust-rewrite work (unused imports, over-arity glyph-drawing functions, a couple of complex inline types, or_insert_with(T::default) instead of or_default(), and one unsimplified test-only arithmetic expression), plus two imports left unused by switching to or_default(). None of these are behavior changes. Full workspace build + clippy -D warnings + test suite (378 tests) all green after this. --- crates/wayland/src/winit/mod.rs | 1 - crates/wayland/src/winit/render.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'crates/wayland/src/winit') diff --git a/crates/wayland/src/winit/mod.rs b/crates/wayland/src/winit/mod.rs index 6a7bac0..5a08a9a 100644 --- a/crates/wayland/src/winit/mod.rs +++ b/crates/wayland/src/winit/mod.rs @@ -19,7 +19,6 @@ use smithay::backend::input::{ }; use smithay::backend::renderer::damage::OutputDamageTracker; use smithay::backend::renderer::element::memory::MemoryRenderBufferRenderElement; -use smithay::backend::renderer::element::solid::SolidColorBuffer; use smithay::backend::renderer::element::Kind; use smithay::backend::renderer::gles::GlesRenderer; use smithay::backend::renderer::ImportDma; diff --git a/crates/wayland/src/winit/render.rs b/crates/wayland/src/winit/render.rs index 5784520..c245aa2 100644 --- a/crates/wayland/src/winit/render.rs +++ b/crates/wayland/src/winit/render.rs @@ -105,7 +105,7 @@ impl WaylandPlatform { { let color_filter = self.wm.borrow().color_filter; let output_name = self.output.name(); - let buf = self.state.color_filter_buffers.entry(output_name).or_insert_with(SolidColorBuffer::default); + let buf = self.state.color_filter_buffers.entry(output_name).or_default(); if let Some(elem) = crate::color_filter::render_element(buf, color_filter, (size.w, size.h)) { custom_elements.push(crate::rounded_corners::WinitElement::Base(crate::elements::OverlayElement::Solid(elem))); } -- cgit v1.2.3