From be2e551a89abb98099f094f73889d6d0cc46c87c Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sun, 24 Dec 2023 17:38:13 +0400 Subject: Move clones up from find_window_and_output --- src/layout/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/layout/mod.rs') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 5d747cfe..5ccbebd1 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -477,12 +477,12 @@ impl Layout { } } - pub fn find_window_and_output(&self, wl_surface: &WlSurface) -> Option<(W, Output)> { + pub fn find_window_and_output(&self, wl_surface: &WlSurface) -> Option<(&W, &Output)> { if let MonitorSet::Normal { monitors, .. } = &self.monitor_set { for mon in monitors { for ws in &mon.workspaces { if let Some(window) = ws.find_wl_surface(wl_surface) { - return Some((window.clone(), mon.output.clone())); + return Some((window, &mon.output)); } } } -- cgit