From 8e3e078220990d15f986080c579c6f373e136e2a Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 1 Jan 2023 22:38:57 +0100 Subject: [PATCH] Fix Clippy lints in macOS backend --- src/macos/view.rs | 2 +- src/macos/window.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/macos/view.rs b/src/macos/view.rs index 1e95ff0..52c9311 100644 --- a/src/macos/view.rs +++ b/src/macos/view.rs @@ -234,7 +234,7 @@ extern "C" fn view_did_change_backing_properties(this: &Object, _: Sel, _: id) { let ns_window: *mut Object = msg_send![this, window]; let scale_factor: f64 = - if ns_window.is_null() { 1.0 } else { NSWindow::backingScaleFactor(ns_window) as f64 }; + if ns_window.is_null() { 1.0 } else { NSWindow::backingScaleFactor(ns_window) }; let state: &mut WindowState = WindowState::from_field(this); diff --git a/src/macos/window.rs b/src/macos/window.rs index bf442da..fd67de7 100644 --- a/src/macos/window.rs +++ b/src/macos/window.rs @@ -229,10 +229,7 @@ impl Window { let rect = NSRect::new( NSPoint::new(0.0, 0.0), - NSSize::new( - window_info.logical_size().width as f64, - window_info.logical_size().height as f64, - ), + NSSize::new(window_info.logical_size().width, window_info.logical_size().height), ); let ns_window = unsafe {