chore linting

This commit is contained in:
zhom committed 2026-02-24 06:09:30 +04:00
1 parent 7e367325be
commit c1fb1e3c4b
2 files changed
+23 -19

No files matched your search

+19 -16
View File
@@ -19,27 +19,30 @@ fn get_ephemeral_base_dir() -> Result<PathBuf, String> {
return Ok(base); return Ok(base);
} }
#[cfg(target_os = "macos")] #[cfg(not(target_os = "linux"))]
{ {
if let Ok(mount) = get_or_create_macos_ramdisk() { #[cfg(target_os = "macos")]
return Ok(mount); {
if let Ok(mount) = get_or_create_macos_ramdisk() {
return Ok(mount);
}
log::warn!("Failed to create macOS RAM disk, ephemeral profiles may use disk");
} }
log::warn!("Failed to create macOS RAM disk, ephemeral profiles may use disk");
}
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
{ {
if let Ok(mount) = get_or_create_windows_ramdisk() { if let Ok(mount) = get_or_create_windows_ramdisk() {
return Ok(mount); return Ok(mount);
}
log::warn!("Failed to create Windows RAM disk, ephemeral profiles may use disk");
} }
log::warn!("Failed to create Windows RAM disk, ephemeral profiles may use disk");
}
// Fallback // Fallback
let base = std::env::temp_dir().join("donut-ephemeral"); let base = std::env::temp_dir().join("donut-ephemeral");
std::fs::create_dir_all(&base) std::fs::create_dir_all(&base)
.map_err(|e| format!("Failed to create ephemeral base dir: {e}"))?; .map_err(|e| format!("Failed to create ephemeral base dir: {e}"))?;
Ok(base) Ok(base)
}
} }
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
+4 -3
View File
@@ -1444,9 +1444,10 @@ pub fn run() {
]) ])
.build(tauri::generate_context!()) .build(tauri::generate_context!())
.expect("error while building tauri application") .expect("error while building tauri application")
.run(|app_handle, event| { .run(|_app_handle, _event| {
if let tauri::RunEvent::Reopen { .. } = event { #[cfg(target_os = "macos")]
if let Some(window) = app_handle.get_webview_window("main") { if let tauri::RunEvent::Reopen { .. } = _event {
if let Some(window) = _app_handle.get_webview_window("main") {
let _ = window.show(); let _ = window.show();
let _ = window.set_focus(); let _ = window.set_focus();
let _ = window.unminimize(); let _ = window.unminimize();