diff --git a/Cargo.lock b/Cargo.lock index 11f8e5e..60e76c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1208,9 +1208,9 @@ dependencies = [ [[package]] name = "xcb-util-cursor" -version = "0.3.5" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf6417c51a1f5eda49156061175021bd3ccf0a759bc7c402bbea6a6a1ae14239" +checksum = "c256d10270e6789ebbed752ec17fcf98a04363dc97aa9b7b92ab1af3a7bc5744" dependencies = [ "xcb", "xcb-util-cursor-sys", @@ -1218,9 +1218,9 @@ dependencies = [ [[package]] name = "xcb-util-cursor-sys" -version = "0.1.6" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c78acb131647687ee62f9e64c988457f23ecb8f3a078a37a312f989b320cb47" +checksum = "8346f6cad5cb6b38645c53431ffe35bd0634e8154f529fa9d3f5f762c03c98b6" dependencies = [ "bindgen", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index ef6cb34..ece7236 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,8 @@ rustix = "1.1.2" all = "deny" [workspace.package] -rust-version = "1.83.0" +rust-version = "1.85.0" +edition = "2024" [package] name = "xwayland-satellite" @@ -20,7 +21,7 @@ version = "0.8.0" authors = ["Shawn Wallace"] license = "MPL-2.0" description = "xwayland-satellite grants rootless Xwayland integration to any Wayland compositor implementing xdg_wm_base and viewporter. This is particularly useful for compositors that (understandably) do not want to go through implementing support for rootless Xwayland themselves." -edition = "2021" +edition.workspace = true rust-version.workspace = true [lints] @@ -39,9 +40,7 @@ xcb = { version = "1.7.0", features = ["composite", "randr", "res"] } wl_drm = { path = "wl_drm" } log = "0.4.21" pretty_env_logger = "0.5.0" -# xcb-util-cursor 0.4 uses Rust 2024, which would bump MSRV from 1.83 to 1.85, however it also has -# no meaningful code changes, so we stick to the older version -xcb-util-cursor = "0.3.5" +xcb-util-cursor = "0.4" smithay-client-toolkit = { version = "0.20.0", default-features = false } fontconfig = { version = "0.10", optional = true } diff --git a/src/server/mod.rs b/src/server/mod.rs index c3cbaba..a9d6a8b 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -182,21 +182,21 @@ enum SurfaceRole { impl SurfaceRole { fn xdg(&self) -> Option<&XdgSurfaceData> { match self { - SurfaceRole::Toplevel(ref t) => t.as_ref().map(|t| &t.xdg), - SurfaceRole::Popup(ref p) => p.as_ref().map(|p| &p.xdg), + SurfaceRole::Toplevel(t) => t.as_ref().map(|t| &t.xdg), + SurfaceRole::Popup(p) => p.as_ref().map(|p| &p.xdg), } } fn xdg_mut(&mut self) -> Option<&mut XdgSurfaceData> { match self { - SurfaceRole::Toplevel(ref mut t) => t.as_mut().map(|t| &mut t.xdg), - SurfaceRole::Popup(ref mut p) => p.as_mut().map(|p| &mut p.xdg), + SurfaceRole::Toplevel(t) => t.as_mut().map(|t| &mut t.xdg), + SurfaceRole::Popup(p) => p.as_mut().map(|p| &mut p.xdg), } } fn destroy(&mut self) { match self { - SurfaceRole::Toplevel(Some(ref mut t)) => { + SurfaceRole::Toplevel(Some(t)) => { if let Some(decoration) = t.decoration.wl.take() { decoration.destroy(); } @@ -1092,7 +1092,7 @@ impl InnerServerState { return; }; - let SurfaceRole::Toplevel(Some(ref toplevel)) = &*role else { + let SurfaceRole::Toplevel(Some(toplevel)) = &*role else { warn!("Tried to set an unmapped toplevel or non toplevel fullscreen: {window:?}"); return; }; diff --git a/src/xstate/selection.rs b/src/xstate/selection.rs index 4797050..aecb782 100644 --- a/src/xstate/selection.rs +++ b/src/xstate/selection.rs @@ -532,7 +532,7 @@ impl SelectionDataImpl for SelectionData { let Some(CurrentSelection::Wayland(WaylandSelection { mimes, inner, - ref mut incr_data, + incr_data, })) = &mut self.current_selection else { warn!("Got selection request, but we don't seem to be the selection owner"); diff --git a/testwl/Cargo.toml b/testwl/Cargo.toml index 6167c22..e1c0348 100644 --- a/testwl/Cargo.toml +++ b/testwl/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "testwl" version = "0.1.0" -edition = "2021" +edition.workspace = true [lints] workspace = true diff --git a/testwl/src/lib.rs b/testwl/src/lib.rs index 81f4a3a..b3c9fcd 100644 --- a/testwl/src/lib.rs +++ b/testwl/src/lib.rs @@ -120,8 +120,8 @@ pub struct SurfaceData { impl SurfaceData { pub fn xdg(&self) -> &XdgSurfaceData { match self.role.as_ref().expect("Surface missing role") { - SurfaceRole::Toplevel(ref t) => &t.xdg, - SurfaceRole::Popup(ref p) => &p.xdg, + SurfaceRole::Toplevel(t) => &t.xdg, + SurfaceRole::Popup(p) => &p.xdg, SurfaceRole::Subsurface(_) => panic!("subsurface doesn't have an XdgSurface"), SurfaceRole::Cursor => panic!("cursor surface doesn't have an XdgSurface"), } @@ -129,13 +129,13 @@ impl SurfaceData { pub fn toplevel(&self) -> &Toplevel { match self.role.as_ref().expect("Surface missing role") { - SurfaceRole::Toplevel(ref t) => t, + SurfaceRole::Toplevel(t) => t, other => panic!("Surface role was not toplevel: {other:?}"), } } pub fn popup(&self) -> &Popup { match self.role.as_ref().expect("Surface missing role") { - SurfaceRole::Popup(ref p) => p, + SurfaceRole::Popup(p) => p, other => panic!("Surface role was not popup: {other:?}"), } }