chore linting

This commit is contained in:
zhom
2026-02-24 06:09:30 +04:00
parent 7e367325be
commit c1fb1e3c4b
2 changed files with 23 additions and 19 deletions
+19 -16
View File
@@ -19,27 +19,30 @@ fn get_ephemeral_base_dir() -> Result<PathBuf, String> {
return Ok(base);
}
#[cfg(target_os = "macos")]
#[cfg(not(target_os = "linux"))]
{
if let Ok(mount) = get_or_create_macos_ramdisk() {
return Ok(mount);
#[cfg(target_os = "macos")]
{
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")]
{
if let Ok(mount) = get_or_create_windows_ramdisk() {
return Ok(mount);
#[cfg(target_os = "windows")]
{
if let Ok(mount) = get_or_create_windows_ramdisk() {
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
let base = std::env::temp_dir().join("donut-ephemeral");
std::fs::create_dir_all(&base)
.map_err(|e| format!("Failed to create ephemeral base dir: {e}"))?;
Ok(base)
// Fallback
let base = std::env::temp_dir().join("donut-ephemeral");
std::fs::create_dir_all(&base)
.map_err(|e| format!("Failed to create ephemeral base dir: {e}"))?;
Ok(base)
}
}
#[cfg(target_os = "macos")]
+4 -3
View File
@@ -1444,9 +1444,10 @@ pub fn run() {
])
.build(tauri::generate_context!())
.expect("error while building tauri application")
.run(|app_handle, event| {
if let tauri::RunEvent::Reopen { .. } = event {
if let Some(window) = app_handle.get_webview_window("main") {
.run(|_app_handle, _event| {
#[cfg(target_os = "macos")]
if let tauri::RunEvent::Reopen { .. } = _event {
if let Some(window) = _app_handle.get_webview_window("main") {
let _ = window.show();
let _ = window.set_focus();
let _ = window.unminimize();