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

@@ -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 {