Fix Rust warnings (#4872)

# Description of Changes
Fix warnings in Rust code on Mac. They were all being caused by file
handling logic which is now built into Tauri, so I've just been able to
remove all of the Mac specific file handling code.

I've also set warnings to be treated as errors because it'll be really
easy to accidentally introudce warnings on individual platforms which
I'm not developing, and I'd like to know about them so we can fix it
before getting dodgy code.
This commit is contained in:
James Brunton
2025-11-11 14:16:44 +00:00
committed by GitHub
parent 044bf3c2aa
commit 0913dbf5b7
6 changed files with 17 additions and 291 deletions
+1
View File
@@ -5,6 +5,7 @@ use std::sync::Mutex;
static OPENED_FILE: Mutex<Option<String>> = Mutex::new(None);
// Set the opened file path (called by macOS file open events)
#[cfg(target_os = "macos")]
pub fn set_opened_file(file_path: String) {
let mut opened_file = OPENED_FILE.lock().unwrap();
*opened_file = Some(file_path.clone());
+3 -1
View File
@@ -4,4 +4,6 @@ pub mod files;
pub use backend::{start_backend, cleanup_backend};
pub use health::check_backend_health;
pub use files::{get_opened_file, clear_opened_file, set_opened_file};
pub use files::{get_opened_file, clear_opened_file};
#[cfg(target_os = "macos")]
pub use files::set_opened_file;