From b778cea2d4b411657944e6675903cbda6b51cd23 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sat, 31 Oct 2026 19:39:52 -0700 Subject: [PATCH] fix(kde): drop three useless .into() on MonitorId in kwin tests clippy::useless_conversion: the values are already komorebi_backend::MonitorId since the Backend id-type change, so .into() converts to the same type. One line is joined where the shorter call now fits, so rustfmt stays happy for the touched lines. Test code only, no behaviour change. Verified: native clippy --all-targets -D warnings over komorebi-linux, komorebic, komorebi-client, komorebi-hotkeys, komorebi-core, the shared crates the KDE flake sees and version-linux/komorebic-linux passes. --- komorebi-for-kde/komorebi/src/kwin/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/komorebi-for-kde/komorebi/src/kwin/mod.rs b/komorebi-for-kde/komorebi/src/kwin/mod.rs index 93481b58..468b7b7b 100644 --- a/komorebi-for-kde/komorebi/src/kwin/mod.rs +++ b/komorebi-for-kde/komorebi/src/kwin/mod.rs @@ -1312,9 +1312,9 @@ mod tests { // the editor goes to the second workspace before the monitor is switched to it let monitor = backend.monitors().unwrap()[0].id; backend.set_window_workspace(1.into(), 1).unwrap(); - backend.switch_workspace(monitor.into(), 1).unwrap(); + backend.switch_workspace(monitor, 1).unwrap(); assert_eq!(backend.window_workspace(1.into()).unwrap(), Some(1)); - assert_eq!(backend.current_workspaces().unwrap(), [(monitor.into(), 1)]); + assert_eq!(backend.current_workspaces().unwrap(), [(monitor, 1)]); }, |backend| { // 51 of 255 is a fifth @@ -1509,8 +1509,7 @@ mod tests { .handle(&events[0], Instant::now()); let monitor = backend.monitors().unwrap()[0].id; - let missing = - backend.set_wallpaper(monitor.into(), std::path::Path::new("/nonexistent/a.png")); + let missing = backend.set_wallpaper(monitor, std::path::Path::new("/nonexistent/a.png")); assert!(missing.unwrap_err().to_string().contains("is not a file")); assert!(backend.shared.wallpapers.lock().is_empty()); }