Remove one unnecessary .clone() call and reorder another
Browse files at this commit80bb0d5876f8fae43791a8d6e52a38d3c1e01a72Parent: c04ccaf1 changed file +2 -3
- src/niri.rs +2 -3
src/niri.rsmodified+2 -3
| @@ -634,7 +634,6 @@ impl State { | |||
| 634 | let Some(output) = self.niri.layout.active_output() else { | 634 | let Some(output) = self.niri.layout.active_output() else { |
| 635 | return false; | 635 | return false; |
| 636 | }; | 636 | }; |
| 637 | - let output = output.clone(); | ||
| 638 | let monitor = self.niri.layout.monitor_for_output(&output).unwrap(); | 637 | let monitor = self.niri.layout.monitor_for_output(&output).unwrap(); |
| 639 | 638 | ||
| 640 | let mut rv = false; | 639 | let mut rv = false; |
| @@ -2667,7 +2666,7 @@ impl Niri { | |||
| 2667 | .tablet_cursor_location | 2666 | .tablet_cursor_location |
| 2668 | .unwrap_or_else(|| self.seat.get_pointer().unwrap().current_location()); | 2667 | .unwrap_or_else(|| self.seat.get_pointer().unwrap().current_location()); |
| 2669 | 2668 | ||
| 2670 | - match self.cursor_manager.cursor_image().clone() { | 2669 | + match self.cursor_manager.cursor_image() { |
| 2671 | CursorImageStatus::Surface(ref surface) => { | 2670 | CursorImageStatus::Surface(ref surface) => { |
| 2672 | let hotspot = with_states(surface, |states| { | 2671 | let hotspot = with_states(surface, |states| { |
| 2673 | states | 2672 | states |
| @@ -2751,7 +2750,7 @@ impl Niri { | |||
| 2751 | }; | 2750 | }; |
| 2752 | 2751 | ||
| 2753 | let icon = if let CursorImageStatus::Named(icon) = cursor_image { | 2752 | let icon = if let CursorImageStatus::Named(icon) = cursor_image { |
| 2754 | - icon | 2753 | + icon.clone() |
| 2755 | } else { | 2754 | } else { |
| 2756 | Default::default() | 2755 | Default::default() |
| 2757 | }; | 2756 | }; |