Skip to content

Commit 10cb0c2

Browse files
clippy fixes
1 parent d9c6d00 commit 10cb0c2

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src-tauri/src/window_manager/macos.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ fn get_tray_window_position(
2828
size: PhysicalSize<u32>,
2929
) -> Option<LogicalPosition<f64>> {
3030
let app_state = app.state::<AppState>();
31+
let tray_click_position = app_state.tray_click_position.lock().unwrap().to_owned();
3132

32-
if let Some(tray_position) = app_state.tray_click_position.lock().unwrap().to_owned() {
33+
if let Some(tray_position) = tray_click_position {
3334
let monitor = get_monitor_for_position(app, tray_position.x, tray_position.y)?;
3435

3536
let scale_factor = monitor.scale_factor();

src-tauri/src/window_manager/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use tauri::{AppHandle, WebviewUrl, WebviewWindow, WebviewWindowBuilder};
33
use crate::database::{models::location::Location, DB_POOL};
44

55
/// Returns `true` if there are any non-service locations in the database.
6+
#[cfg(not(target_os = "linux"))]
67
pub async fn has_non_service_locations() -> bool {
78
match Location::all(&*DB_POOL, false).await {
89
Ok(locations) => !locations.is_empty(),

0 commit comments

Comments
 (0)