feat: update dependencies for improved compatibility and performance

This commit is contained in:
2026-03-15 19:14:50 +01:00
parent 4283460c82
commit bf065ffdf0
6 changed files with 40 additions and 125 deletions

View File

@@ -15,4 +15,4 @@ serde_json = "1.0"
tokio = { workspace = true }
[target.'cfg(target_os = "linux")'.dependencies]
xdg = "2"
xdg = "3"

View File

@@ -37,8 +37,8 @@ impl FrecencyStore {
pub fn load() -> Arc<Self> {
let path = xdg::BaseDirectories::new()
.map(|xdg| xdg.get_data_home())
.unwrap_or_else(|_| PathBuf::from("."))
.get_data_home()
.unwrap_or_else(|| PathBuf::from("."))
.join("k-launcher")
.join("frecency.json");
Self::new(path)

View File

@@ -20,11 +20,12 @@ impl Default for FsDesktopEntrySource {
impl DesktopEntrySource for FsDesktopEntrySource {
fn entries(&self) -> Vec<DesktopEntry> {
let mut dirs = Vec::new();
if let Ok(xdg) = xdg::BaseDirectories::new() {
dirs.push(xdg.get_data_home().join("applications"));
for d in xdg.get_data_dirs() {
dirs.push(d.join("applications"));
}
let xdg = xdg::BaseDirectories::new();
if let Some(data_home) = xdg.get_data_home() {
dirs.push(data_home.join("applications"));
}
for d in xdg.get_data_dirs() {
dirs.push(d.join("applications"));
}
let mut entries = Vec::new();
for dir in &dirs {

View File

@@ -9,6 +9,6 @@ path = "src/lib.rs"
[dependencies]
async-trait = { workspace = true }
evalexpr = "11"
evalexpr = "13"
k-launcher-kernel = { path = "../../k-launcher-kernel" }
tokio = { workspace = true }