feat: update dependencies for improved compatibility and performance
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user