mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-18 14:48:34 +01:00
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.
This commit is contained in:
1 parent
842660720f
commit
b778cea2d4
1 file changed
+3
-4
@@ -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());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user