From ad4e8ee742e1896163b66b795b25f32d56e0f6ac Mon Sep 17 00:00:00 2001 From: arabian Date: Sun, 17 May 2026 17:04:52 +0300 Subject: [PATCH] small refactor --- Cargo.toml | 2 +- src/utils/daemon.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1258fe8..e60dcb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,6 +38,7 @@ rfd = { version = "0.17.2", default-features = false, features = [ opener = { version = "0.8.4", features = ["reveal"] } system-fonts = "0.1.0" anyhow = "1.0.102" +rustix = { version = "1.1.4", features = ["process"] } rust-i18n = "4.0.0" sys-locale = "0.3.2" @@ -62,7 +63,6 @@ eframe = { version = "0.34.2", default-features = false, features = [ egui_extras = "0.34.1" egui_material_icons = "0.6.0" egui_dnd = "0.15.0" -rustix = { version = "1.1.4", features = ["process"] } [[bin]] name = "pwsp-daemon" diff --git a/src/utils/daemon.rs b/src/utils/daemon.rs index bbd6b4d..45e4538 100644 --- a/src/utils/daemon.rs +++ b/src/utils/daemon.rs @@ -7,7 +7,7 @@ use crate::types::{ use anyhow::Result; use std::os::unix::fs::{DirBuilderExt, MetadataExt, PermissionsExt}; use std::path::PathBuf; -use std::{error::Error, fs}; +use std::{env, error::Error, fs}; use tokio::{ io::{AsyncReadExt, AsyncWriteExt}, net::UnixStream, @@ -44,7 +44,7 @@ fn get_current_uid() -> u32 { pub fn get_runtime_dir() -> PathBuf { dirs::runtime_dir().unwrap_or_else(|| { let uid = get_current_uid(); - std::env::temp_dir().join(format!("pwsp-{}", uid)) + env::temp_dir().join(format!("pwsp-{}", uid)) }) }