diff --git a/Cargo.lock b/Cargo.lock index cbf85b2..13ce4a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1519,7 +1519,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1541,7 +1541,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "quote", "syn 1.0.109", @@ -1842,7 +1842,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "almost", "cosmic-config", @@ -3215,7 +3215,7 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "dnd", "iced_accessibility", @@ -3233,7 +3233,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "accesskit", "accesskit_winit", @@ -3242,7 +3242,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "bitflags 2.8.0", "bytes", @@ -3267,7 +3267,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "futures", "iced_core", @@ -3293,7 +3293,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "bitflags 2.8.0", "bytemuck", @@ -3315,7 +3315,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3327,7 +3327,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "bytes", "cosmic-client-toolkit", @@ -3343,7 +3343,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "bytemuck", "cosmic-text", @@ -3359,7 +3359,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "as-raw-xcb-connection", "bitflags 2.8.0", @@ -3390,7 +3390,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3409,7 +3409,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -4414,7 +4414,7 @@ checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#ccc1068d9fd894334feef7d50a7a2b6930c7a34f" +source = "git+https://github.com/pop-os/libcosmic#580db26868a67aba768669fc3762e81a93e0fb85" dependencies = [ "apply", "ashpd 0.9.2", diff --git a/cosmic-settings/src/pages/desktop/window_management.rs b/cosmic-settings/src/pages/desktop/window_management.rs index 2fb4989..b041404 100644 --- a/cosmic-settings/src/pages/desktop/window_management.rs +++ b/cosmic-settings/src/pages/desktop/window_management.rs @@ -46,7 +46,7 @@ impl Default for Page { let focus_follows_cursor = comp_config .get("focus_follows_cursor") .unwrap_or_else(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'focus_follows_cursor'"); } false @@ -54,7 +54,7 @@ impl Default for Page { let cursor_follows_focus = comp_config .get("cursor_follows_focus") .unwrap_or_else(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'cursor_follows_focus'"); } false @@ -63,7 +63,7 @@ impl Default for Page { let focus_follows_cursor_delay = comp_config .get("focus_follows_cursor_delay") .inspect_err(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'focus_follows_cursor_delay'") } }) @@ -72,7 +72,7 @@ impl Default for Page { let show_active_hint = comp_config .get("active_hint") .inspect_err(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'active_hint'") } }) @@ -81,7 +81,7 @@ impl Default for Page { let edge_snap_threshold = comp_config .get("edge_snap_threshold") .inspect_err(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'edge_snap_threshold'") } }) diff --git a/cosmic-settings/src/pages/desktop/workspaces.rs b/cosmic-settings/src/pages/desktop/workspaces.rs index c66c6c5..e291fc0 100644 --- a/cosmic-settings/src/pages/desktop/workspaces.rs +++ b/cosmic-settings/src/pages/desktop/workspaces.rs @@ -36,7 +36,7 @@ impl Default for Page { fn default() -> Self { let comp_config = cosmic_config::Config::new("com.system76.CosmicComp", 1).unwrap(); let comp_workspace_config = comp_config.get("workspaces").unwrap_or_else(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'workspaces'"); } @@ -44,14 +44,14 @@ impl Default for Page { }); let config = cosmic_config::Config::new("com.system76.CosmicWorkspaces", 1).unwrap(); let show_workspace_name = config.get("show_workspace_name").unwrap_or_else(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'show_workspace_name'"); } false }); let show_workspace_number = config.get("show_workspace_number").unwrap_or_else(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'show_workspace_number'"); } diff --git a/cosmic-settings/src/pages/display/mod.rs b/cosmic-settings/src/pages/display/mod.rs index 0bda08f..7341128 100644 --- a/cosmic-settings/src/pages/display/mod.rs +++ b/cosmic-settings/src/pages/display/mod.rs @@ -162,7 +162,7 @@ impl Default for Page { let comp_config = cosmic_config::Config::new("com.system76.CosmicComp", 1).unwrap(); let comp_config_descale_xwayland = comp_config.get("descale_xwayland").unwrap_or_else(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'descale_xwayland'"); } diff --git a/cosmic-settings/src/pages/input/mod.rs b/cosmic-settings/src/pages/input/mod.rs index e157390..6b8aa74 100644 --- a/cosmic-settings/src/pages/input/mod.rs +++ b/cosmic-settings/src/pages/input/mod.rs @@ -46,7 +46,7 @@ fn get_config( key: &str, ) -> T { config.get(key).unwrap_or_else(|why| { - if !matches!(why, cosmic_config::Error::NoConfigDirectory) { + if why.is_err() { error!(?why, "Failed to read config '{}'", key); } diff --git a/cosmic-settings/src/pages/input/touchpad.rs b/cosmic-settings/src/pages/input/touchpad.rs index ec850b2..4118ddc 100644 --- a/cosmic-settings/src/pages/input/touchpad.rs +++ b/cosmic-settings/src/pages/input/touchpad.rs @@ -21,7 +21,7 @@ impl Default for Page { fn default() -> Self { let comp_config = cosmic_config::Config::new("com.system76.CosmicComp", 1).unwrap(); let comp_workspace_config = comp_config.get("workspaces").unwrap_or_else(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'workspaces'"); } diff --git a/cosmic-settings/src/pages/time/date.rs b/cosmic-settings/src/pages/time/date.rs index 10348c5..c25801a 100644 --- a/cosmic-settings/src/pages/time/date.rs +++ b/cosmic-settings/src/pages/time/date.rs @@ -56,7 +56,7 @@ impl Default for Page { let military_time = cosmic_applet_config .get("military_time") .unwrap_or_else(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'military_time'"); } @@ -66,7 +66,7 @@ impl Default for Page { let show_seconds = cosmic_applet_config .get("show_seconds") .unwrap_or_else(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'show_seconds'"); } @@ -76,7 +76,7 @@ impl Default for Page { let first_day_of_week = cosmic_applet_config .get("first_day_of_week") .unwrap_or_else(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'first_day_of_week'"); } @@ -86,7 +86,7 @@ impl Default for Page { let show_date_in_top_panel = cosmic_applet_config .get("show_date_in_top_panel") .unwrap_or_else(|err| { - if !matches!(err, cosmic_config::Error::NoConfigDirectory) { + if err.is_err() { error!(?err, "Failed to read config 'show_date_in_top_panel'"); }