Skip to content

Commit 69a3bc2

Browse files
committed
chore: update dependencies
Updates all dependencies other than ICU. Also prevents the trash and network drive layer container from touching the edge of the window.
1 parent 16cd463 commit 69a3bc2

12 files changed

Lines changed: 837 additions & 695 deletions

File tree

Cargo.lock

Lines changed: 721 additions & 588 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ icu = { version = "1.5.0", features = [
1414
"compiled_data",
1515
"icu_datetime_experimental",
1616
] }
17-
cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "178eb0b", optional = true }
17+
cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "6254f50", optional = true }
1818
cosmic-mime-apps = { git = "https://github.com/pop-os/cosmic-mime-apps.git", optional = true }
1919
dirs = "6.0.0"
2020
env_logger = "0.11"
2121
freedesktop_entry_parser = "1.3"
2222
futures = "0.3.31"
23-
gio = { version = "0.20", optional = true }
24-
glib = { version = "0.20", optional = true }
23+
gio = { version = "0.21", optional = true }
24+
glib = { version = "0.21", optional = true }
2525
glob = "0.3"
2626
icu_collator = "1.5"
2727
icu_provider = { version = "1.5", features = ["sync"] }
@@ -30,9 +30,8 @@ image = "0.25"
3030
libc = "0.2"
3131
log = "0.4"
3232
mime_guess = "2"
33-
notify-debouncer-full = "0.3"
33+
notify-debouncer-full = "0.6"
3434
notify-rust = { version = "4", optional = true }
35-
once_cell = "1.20"
3635
open = "5.3.2"
3736
paste = "1.0"
3837
regex = "1"
@@ -44,40 +43,40 @@ tokio = { version = "1", features = ["process", "sync"] }
4443
trash = { git = "https://github.com/jackpot51/trash-rs.git", branch = "cosmic" }
4544
url = "2.5"
4645
walkdir = "2.5.0"
47-
wayland-client = { version = "0.31.8", optional = true }
48-
xdg = { version = "2.5.2", optional = true }
46+
wayland-client = { version = "0.31.11", optional = true }
47+
xdg = { version = "3.0", optional = true }
4948
# https://github.com/ebassi/xdg-mime-rs/pull/31
5049
xdg-mime = { git = "https://github.com/ellieplayswow/xdg-mime-rs", branch = "feature/get-same-as" }
5150
# Compression
52-
bzip2 = { version = "0.5", optional = true } #TODO: replace with pure Rust crate
53-
flate2 = "1.0"
54-
tar = "0.4.43"
55-
xz2 = { version = "0.1", optional = true } #TODO: replace with pure Rust crate
56-
ordermap = { version = "0.5.8", features = ["serde"] }
51+
bzip2 = { version = "0.6", optional = true } #TODO: replace with pure Rust crate
52+
flate2 = "1.1"
53+
tar = "0.4.44"
54+
liblzma = { version = "0.4.4", optional = true } #TODO: replace with pure Rust crate
55+
ordermap = { version = "0.5.9", features = ["serde"] }
5756
# Internationalization
58-
i18n-embed = { version = "0.15", features = [
57+
i18n-embed = { version = "0.16", features = [
5958
"fluent-system",
6059
"desktop-requester",
6160
] }
62-
i18n-embed-fl = "0.9"
61+
i18n-embed-fl = "0.10"
6362
rust-embed = "8"
6463
slotmap = "1.0.7"
6564
recently-used-xbel = { git = "https://github.com/pop-os/recently-used-xbel.git" }
66-
zip = "2.2.2"
65+
zip = "4.6.1"
6766
uzers = "0.12.1"
6867
md-5 = "0.10.6"
69-
png = "0.17.16"
70-
jxl-oxide = { version = "0.12.2", features = ["image"] }
68+
png = "0.18"
69+
jxl-oxide = { version = "0.12.4", features = ["image"] }
7170
num_cpus = "1.17.0"
7271

7372
# Completion-based IO runtime to enable io_uring / IOCP file IO support.
7473
[dependencies.compio]
75-
version = "0.14.0"
74+
version = "0.15.0"
7675
default-features = false
7776
features = ["io", "macros", "polling", "runtime"]
7877

7978
[dependencies.io-uring]
80-
version = "0.7.6"
79+
version = "0.7.10"
8180
default-features = false
8281
optional = true
8382

@@ -96,7 +95,7 @@ default = [
9695
"notify",
9796
"wgpu",
9897
"wayland",
99-
"xz2",
98+
"liblzma",
10099
]
101100
dbus-config = ["libcosmic/dbus-config"]
102101
desktop = [
@@ -125,7 +124,7 @@ debug = true
125124
fork = "0.2"
126125

127126
[target.'cfg(target_os = "linux")'.dependencies]
128-
procfs = "0.17"
127+
procfs = "0.18"
129128

130129
[dev-dependencies]
131130
# cap-std = "3"

src/app.rs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ use cosmic::{
4444
};
4545
use mime_guess::Mime;
4646
use notify_debouncer_full::{
47-
DebouncedEvent, Debouncer, FileIdMap, new_debouncer,
48-
notify::{self, RecommendedWatcher, Watcher},
47+
DebouncedEvent, Debouncer, RecommendedCache, new_debouncer,
48+
notify::{self, RecommendedWatcher},
4949
};
5050
use slotmap::Key as SlotMapKey;
5151
use std::{
@@ -611,7 +611,7 @@ pub enum WindowKind {
611611
}
612612

613613
pub struct WatcherWrapper {
614-
watcher_opt: Option<Debouncer<RecommendedWatcher, FileIdMap>>,
614+
watcher_opt: Option<Debouncer<RecommendedWatcher, RecommendedCache>>,
615615
}
616616

617617
impl Clone for WatcherWrapper {
@@ -673,7 +673,10 @@ pub struct App {
673673
#[cfg(all(feature = "wayland", feature = "desktop-applet"))]
674674
surface_names: HashMap<WindowId, String>,
675675
toasts: widget::toaster::Toasts<Message>,
676-
watcher_opt: Option<(Debouncer<RecommendedWatcher, FileIdMap>, HashSet<PathBuf>)>,
676+
watcher_opt: Option<(
677+
Debouncer<RecommendedWatcher, RecommendedCache>,
678+
HashSet<PathBuf>,
679+
)>,
677680
windows: HashMap<window::Id, WindowKind>,
678681
nav_dnd_hover: Option<(Location, Instant)>,
679682
tab_dnd_hover: Option<(Entity, Instant)>,
@@ -1583,7 +1586,7 @@ impl App {
15831586
// Unwatch paths no longer used
15841587
for path in old_paths.iter() {
15851588
if !new_paths.contains(path) {
1586-
match watcher.watcher().unwatch(path) {
1589+
match watcher.unwatch(path) {
15871590
Ok(()) => {
15881591
log::debug!("unwatching {:?}", path);
15891592
}
@@ -1597,10 +1600,7 @@ impl App {
15971600
// Watch new paths
15981601
for path in new_paths.iter() {
15991602
if !old_paths.contains(path) {
1600-
match watcher
1601-
.watcher()
1602-
.watch(path, notify::RecursiveMode::NonRecursive)
1603-
{
1603+
match watcher.watch(path, notify::RecursiveMode::NonRecursive) {
16041604
Ok(()) => {
16051605
log::debug!("watching {:?}", path);
16061606
}
@@ -5983,9 +5983,8 @@ impl Application for App {
59835983
.map(|path| [path.join("files"), path])
59845984
.flatten();
59855985
for path in trash_paths {
5986-
if let Err(e) = watcher
5987-
.watcher()
5988-
.watch(&path, notify::RecursiveMode::NonRecursive)
5986+
if let Err(e) =
5987+
watcher.watch(&path, notify::RecursiveMode::NonRecursive)
59895988
{
59905989
log::warn!(
59915990
"failed to add trash bin `{}` to watcher: {e:?}",
@@ -6055,9 +6054,8 @@ impl Application for App {
60556054

60566055
match watcher_res {
60576056
Ok(mut watcher) => {
6058-
if let Err(e) = watcher
6059-
.watcher()
6060-
.watch(&recents_path, notify::RecursiveMode::NonRecursive)
6057+
if let Err(e) =
6058+
watcher.watch(&recents_path, notify::RecursiveMode::NonRecursive)
60616059
{
60626060
log::warn!(
60636061
"failed to add recents file `{}` to watcher: {}",

src/archive.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ pub const SUPPORTED_ARCHIVE_TYPES: &[&str] = &[
2424
"application/x-bzip2",
2525
#[cfg(feature = "bzip2")]
2626
"application/x-bzip2-compressed-tar",
27-
#[cfg(feature = "xz2")]
27+
#[cfg(feature = "liblzma")]
2828
"application/x-xz",
29-
#[cfg(feature = "xz2")]
29+
#[cfg(feature = "liblzma")]
3030
"application/x-xz-compressed-tar",
3131
];
3232

@@ -83,10 +83,10 @@ pub fn extract(
8383
.map(tar::Archive::new)
8484
.and_then(|mut archive| archive.unpack(&new_dir))
8585
.map_err(OperationError::from_str)?,
86-
#[cfg(feature = "xz2")]
86+
#[cfg(feature = "liblzma")]
8787
"application/x-xz" | "application/x-xz-compressed-tar" => OpReader::new(path, controller)
8888
.map(io::BufReader::new)
89-
.map(xz2::read::XzDecoder::new)
89+
.map(liblzma::read::XzDecoder::new)
9090
.map(tar::Archive::new)
9191
.and_then(|mut archive| archive.unpack(&new_dir))
9292
.map_err(OperationError::from_str)?,

src/dialog.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ use cosmic::{
1919
},
2020
};
2121
use notify_debouncer_full::{
22-
DebouncedEvent, Debouncer, FileIdMap, new_debouncer,
23-
notify::{self, RecommendedWatcher, Watcher},
22+
DebouncedEvent, Debouncer, RecommendedCache, new_debouncer,
23+
notify::{self, RecommendedWatcher},
2424
};
2525
use recently_used_xbel::update_recently_used;
2626
use std::{
@@ -468,7 +468,7 @@ impl From<AppMessage> for Message {
468468
pub struct MounterData(MounterKey, MounterItem);
469469

470470
struct WatcherWrapper {
471-
watcher_opt: Option<Debouncer<RecommendedWatcher, FileIdMap>>,
471+
watcher_opt: Option<Debouncer<RecommendedWatcher, RecommendedCache>>,
472472
}
473473

474474
impl Clone for WatcherWrapper {
@@ -510,7 +510,10 @@ struct App {
510510
search_id: widget::Id,
511511
tab: Tab,
512512
key_binds: HashMap<KeyBind, Action>,
513-
watcher_opt: Option<(Debouncer<RecommendedWatcher, FileIdMap>, HashSet<PathBuf>)>,
513+
watcher_opt: Option<(
514+
Debouncer<RecommendedWatcher, RecommendedCache>,
515+
HashSet<PathBuf>,
516+
)>,
514517
auto_scroll_speed: Option<i16>,
515518
}
516519

@@ -866,7 +869,7 @@ impl App {
866869
// Unwatch paths no longer used
867870
for path in old_paths.iter() {
868871
if !new_paths.contains(path) {
869-
match watcher.watcher().unwatch(path) {
872+
match watcher.unwatch(path) {
870873
Ok(()) => {
871874
log::debug!("unwatching {:?}", path);
872875
}
@@ -881,10 +884,7 @@ impl App {
881884
for path in new_paths.iter() {
882885
if !old_paths.contains(path) {
883886
//TODO: should this be recursive?
884-
match watcher
885-
.watcher()
886-
.watch(path, notify::RecursiveMode::NonRecursive)
887-
{
887+
match watcher.watch(path, notify::RecursiveMode::NonRecursive) {
888888
Ok(()) => {
889889
log::debug!("watching {:?}", path);
890890
}

src/localize.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
// SPDX-License-Identifier: GPL-3.0-only
22

3-
use std::str::FromStr;
4-
53
use i18n_embed::{
64
DefaultLocalizer, LanguageLoader, Localizer,
75
fluent::{FluentLanguageLoader, fluent_language_loader},
86
};
97
use icu::locid::Locale;
108
use icu_collator::{Collator, CollatorOptions, Numeric};
119
use icu_provider::DataLocale;
12-
use once_cell::sync::Lazy;
1310
use rust_embed::RustEmbed;
11+
use std::str::FromStr;
12+
use std::sync::LazyLock;
1413

1514
#[derive(RustEmbed)]
1615
#[folder = "i18n/"]
1716
struct Localizations;
1817

19-
pub static LANGUAGE_LOADER: Lazy<FluentLanguageLoader> = Lazy::new(|| {
18+
pub static LANGUAGE_LOADER: LazyLock<FluentLanguageLoader> = LazyLock::new(|| {
2019
let loader: FluentLanguageLoader = fluent_language_loader!();
2120

2221
loader
@@ -26,7 +25,7 @@ pub static LANGUAGE_LOADER: Lazy<FluentLanguageLoader> = Lazy::new(|| {
2625
loader
2726
});
2827

29-
pub static LANGUAGE_SORTER: Lazy<Collator> = Lazy::new(|| {
28+
pub static LANGUAGE_SORTER: LazyLock<Collator> = LazyLock::new(|| {
3029
let mut options = CollatorOptions::new();
3130
options.numeric = Some(Numeric::On);
3231

@@ -41,7 +40,7 @@ pub static LANGUAGE_SORTER: Lazy<Collator> = Lazy::new(|| {
4140
.expect("Creating a collator from the system's current language, the fallback language, or American English should succeed")
4241
});
4342

44-
pub static LOCALE: Lazy<Locale> = Lazy::new(|| {
43+
pub static LOCALE: LazyLock<Locale> = LazyLock::new(|| {
4544
fn get_local() -> Result<Locale, Box<dyn std::error::Error>> {
4645
let locale = std::env::var("LC_TIME").or_else(|_| std::env::var("LANG"))?;
4746

src/mime_app.rs

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -291,29 +291,22 @@ impl MimeAppCache {
291291
// https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html
292292
//TODO: ensure correct lookup order
293293
let mut mimeapps_paths = Vec::new();
294-
match xdg::BaseDirectories::new() {
295-
Ok(xdg_dirs) => {
296-
for path in xdg_dirs.find_data_files("applications/mimeapps.list") {
297-
mimeapps_paths.push(path);
298-
}
299-
for desktop in desktops.iter().rev() {
300-
for path in
301-
xdg_dirs.find_data_files(format!("applications/{desktop}-mimeapps.list"))
302-
{
303-
mimeapps_paths.push(path);
304-
}
305-
}
306-
for path in xdg_dirs.find_config_files("mimeapps.list") {
307-
mimeapps_paths.push(path);
308-
}
309-
for desktop in desktops.iter().rev() {
310-
for path in xdg_dirs.find_config_files(format!("{desktop}-mimeapps.list")) {
311-
mimeapps_paths.push(path);
312-
}
313-
}
294+
let xdg_dirs = xdg::BaseDirectories::new();
295+
296+
for path in xdg_dirs.find_data_files("applications/mimeapps.list") {
297+
mimeapps_paths.push(path);
298+
}
299+
for desktop in desktops.iter().rev() {
300+
for path in xdg_dirs.find_data_files(format!("applications/{desktop}-mimeapps.list")) {
301+
mimeapps_paths.push(path);
314302
}
315-
Err(err) => {
316-
log::warn!("failed to get xdg base directories: {}", err);
303+
}
304+
for path in xdg_dirs.find_config_files("mimeapps.list") {
305+
mimeapps_paths.push(path);
306+
}
307+
for desktop in desktops.iter().rev() {
308+
for path in xdg_dirs.find_config_files(format!("{desktop}-mimeapps.list")) {
309+
mimeapps_paths.push(path);
317310
}
318311
}
319312

src/mime_icon.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
use cosmic::widget::icon;
44
use mime_guess::Mime;
5-
use once_cell::sync::Lazy;
6-
use std::{collections::HashMap, fs, path::Path, sync::Mutex};
5+
use std::{
6+
collections::HashMap,
7+
fs,
8+
path::Path,
9+
sync::{LazyLock, Mutex},
10+
};
711

812
pub const FALLBACK_MIME_ICON: &str = "text-x-generic";
913

@@ -48,7 +52,8 @@ impl MimeIconCache {
4852
.clone()
4953
}
5054
}
51-
static MIME_ICON_CACHE: Lazy<Mutex<MimeIconCache>> = Lazy::new(|| Mutex::new(MimeIconCache::new()));
55+
static MIME_ICON_CACHE: LazyLock<Mutex<MimeIconCache>> =
56+
LazyLock::new(|| Mutex::new(MimeIconCache::new()));
5257

5358
pub fn mime_for_path<P: AsRef<Path>>(
5459
path: P,

src/mounter/mod.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
use cosmic::{Task, iced::Subscription, widget};
2-
use once_cell::sync::Lazy;
3-
use std::{collections::BTreeMap, fmt, path::PathBuf, sync::Arc};
2+
use std::{
3+
collections::BTreeMap,
4+
fmt,
5+
path::PathBuf,
6+
sync::{Arc, LazyLock},
7+
};
48
use tokio::sync::mpsc;
59

610
use crate::{config::IconSizes, tab};
@@ -125,4 +129,4 @@ pub fn mounters() -> Mounters {
125129
Mounters::new(mounters)
126130
}
127131

128-
pub static MOUNTERS: Lazy<Mounters> = Lazy::new(mounters);
132+
pub static MOUNTERS: LazyLock<Mounters> = LazyLock::new(mounters);

0 commit comments

Comments
 (0)