Skip to content

Commit e422539

Browse files
committed
fix: lint issues
1 parent 6d7a19f commit e422539

File tree

5 files changed

+6
-12
lines changed

5 files changed

+6
-12
lines changed

libs/border/src/macos/border.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use color::ColorExt;
1818

1919
use crate::macos::tag;
2020

21-
static CLS_NAME: &'static str = "BorderView";
21+
static CLS_NAME: &str = "BorderView";
2222

2323
pub struct BorderView;
2424

@@ -175,9 +175,7 @@ impl BorderView {
175175

176176
let () = unsafe { msg_send![border_view, setTag: tag::from_str(&tag)] };
177177

178-
let border_view = unsafe { Id::from_retained_ptr(border_view as *mut BorderView) };
179-
180-
border_view
178+
unsafe { Id::from_retained_ptr(border_view as *mut BorderView) }
181179
}
182180

183181
pub fn set_parent(&self, parent_view: id) {

libs/menubar/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ pub fn get_menubar() -> Menubar {
3939

4040
#[cfg(target_os = "macos")]
4141
{
42-
return Menubar::default();
42+
Menubar::default()
4343
}
4444
}

libs/monitor/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub fn get_monitor_with_cursor() -> Option<Monitor> {
8484

8585
#[cfg(target_os = "macos")]
8686
{
87-
return macos::monitor::get_monitor_with_cursor();
87+
macos::monitor::get_monitor_with_cursor()
8888
}
8989
}
9090

@@ -101,6 +101,6 @@ pub fn get_monitors() -> Vec<Monitor> {
101101

102102
#[cfg(target_os = "macos")]
103103
{
104-
return macos::monitor::get_monitors();
104+
macos::monitor::get_monitors()
105105
}
106106
}

libs/popover/src/macos/popover.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,7 @@ impl PopoverView {
393393

394394
let () = unsafe { msg_send![popover_view, setRightEdgeMargin: config.right_edge_margin ] };
395395

396-
let popover_view = unsafe { Id::from_retained_ptr(popover_view as *mut PopoverView) };
397-
398-
popover_view
396+
unsafe { Id::from_retained_ptr(popover_view as *mut PopoverView) }
399397
}
400398

401399
pub fn set_frame(&self, frame: NSRect) {

libs/share-picker/src/macos/share.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ impl<R: Runtime> SharePicker<R> for WebviewWindow<R> {
6363

6464
let content_view = window.contentView().unwrap();
6565

66-
let scale_factor = self.scale_factor().unwrap();
67-
6866
let position = PhysicalPosition {
6967
x: position.x,
7068
y: window.frame().size.height - position.y,

0 commit comments

Comments
 (0)