clippy fixes

macos-click-through
Keith Simmons 3 years ago
parent 407a7e24a9
commit 4159c47ff4

@ -109,7 +109,7 @@ impl MouseManager {
let global_bounds = relevant_window_details let global_bounds = relevant_window_details
.map(|details| details.region) .map(|details| details.region)
.unwrap_or(Rect::from_wh(size.width as f32, size.height as f32)); .unwrap_or_else(|| Rect::from_wh(size.width as f32, size.height as f32));
let clamped_position = clamp_position( let clamped_position = clamp_position(
logical_position, logical_position,
global_bounds, global_bounds,
@ -133,10 +133,10 @@ impl MouseManager {
// into grid coordinates, but non floating windows do not. // into grid coordinates, but non floating windows do not.
self.drag_position = if relevant_window_details.floating_order.is_some() { self.drag_position = if relevant_window_details.floating_order.is_some() {
// Floating windows handle relative grid coordinates just fine // Floating windows handle relative grid coordinates just fine
self.relative_position.clone() self.relative_position
} else { } else {
// Non floating windows need global coordinates // Non floating windows need global coordinates
self.position.clone() self.position
}; };
let has_moved = self.drag_position != previous_position; let has_moved = self.drag_position != previous_position;

Loading…
Cancel
Save