From 43f561e65ad571144baa962d2783ad7280b25083 Mon Sep 17 00:00:00 2001 From: Charlotte Meyer Date: Sun, 3 Feb 2019 00:09:40 +0100 Subject: [PATCH] removed unnecessary clones --- src/input/pointer.rs | 2 +- src/output/output.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/input/pointer.rs b/src/input/pointer.rs index 56ad5eb..a5b48a1 100644 --- a/src/input/pointer.rs +++ b/src/input/pointer.rs @@ -49,7 +49,7 @@ impl pointer::Handler for Pointer { let shell_handle = &state.shells[0]; let seat_handle = state.seat_handle.clone().unwrap(); - let keyboard_handle = state.keyboards[0].clone(); + let keyboard_handle = &state.keyboards[0]; use shell_handle as shell; match shell.state() { diff --git a/src/output/output.rs b/src/output/output.rs index 18a5474..637bd3d 100644 --- a/src/output/output.rs +++ b/src/output/output.rs @@ -28,9 +28,8 @@ impl output::Handler for Output { #[wlroots_dehandle(shell, surface, layout)] fn render_shells(state: &mut CompositorState, renderer: &mut Renderer) { - let shells = state.shells.clone(); let layout_handle = &state.layout_handle; - for shell_handle in shells { + for shell_handle in &state.shells { use shell_handle as shell; let surface_handle = shell.surface(); use layout_handle as layout;