mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
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:
@@ -1,26 +1,22 @@
|
||||
use tauri::{RunEvent, WindowEvent, Emitter};
|
||||
use tauri::{RunEvent, WindowEvent};
|
||||
#[cfg(target_os = "macos")]
|
||||
use tauri::Emitter;
|
||||
|
||||
mod utils;
|
||||
mod commands;
|
||||
mod file_handler;
|
||||
|
||||
use commands::{start_backend, check_backend_health, get_opened_file, clear_opened_file, cleanup_backend, set_opened_file};
|
||||
use commands::{start_backend, check_backend_health, get_opened_file, clear_opened_file, cleanup_backend};
|
||||
#[cfg(target_os = "macos")]
|
||||
use commands::set_opened_file;
|
||||
use utils::{add_log, get_tauri_logs};
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
// Initialize file handler early for macOS
|
||||
file_handler::early_init();
|
||||
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.setup(|app| {
|
||||
.setup(|_app| {
|
||||
add_log("🚀 Tauri app setup started".to_string());
|
||||
|
||||
// Initialize platform-specific file handler
|
||||
file_handler::initialize_file_handler(&app.handle());
|
||||
|
||||
add_log("🔍 DEBUG: Setup completed".to_string());
|
||||
Ok(())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user