Update to Rust 2024
Bumps MSRV to 1.85.
This commit is contained in:
parent
645ca1125b
commit
1979beaa39
6 changed files with 20 additions and 21 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
|
@ -1208,9 +1208,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "xcb-util-cursor"
|
name = "xcb-util-cursor"
|
||||||
version = "0.3.5"
|
version = "0.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bf6417c51a1f5eda49156061175021bd3ccf0a759bc7c402bbea6a6a1ae14239"
|
checksum = "c256d10270e6789ebbed752ec17fcf98a04363dc97aa9b7b92ab1af3a7bc5744"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"xcb",
|
"xcb",
|
||||||
"xcb-util-cursor-sys",
|
"xcb-util-cursor-sys",
|
||||||
|
|
@ -1218,9 +1218,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "xcb-util-cursor-sys"
|
name = "xcb-util-cursor-sys"
|
||||||
version = "0.1.6"
|
version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4c78acb131647687ee62f9e64c988457f23ecb8f3a078a37a312f989b320cb47"
|
checksum = "8346f6cad5cb6b38645c53431ffe35bd0634e8154f529fa9d3f5f762c03c98b6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bindgen",
|
"bindgen",
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ rustix = "1.1.2"
|
||||||
all = "deny"
|
all = "deny"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
rust-version = "1.83.0"
|
rust-version = "1.85.0"
|
||||||
|
edition = "2024"
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "xwayland-satellite"
|
name = "xwayland-satellite"
|
||||||
|
|
@ -20,7 +21,7 @@ version = "0.8.0"
|
||||||
authors = ["Shawn Wallace"]
|
authors = ["Shawn Wallace"]
|
||||||
license = "MPL-2.0"
|
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."
|
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
|
rust-version.workspace = true
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
|
|
@ -39,9 +40,7 @@ xcb = { version = "1.7.0", features = ["composite", "randr", "res"] }
|
||||||
wl_drm = { path = "wl_drm" }
|
wl_drm = { path = "wl_drm" }
|
||||||
log = "0.4.21"
|
log = "0.4.21"
|
||||||
pretty_env_logger = "0.5.0"
|
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
|
xcb-util-cursor = "0.4"
|
||||||
# no meaningful code changes, so we stick to the older version
|
|
||||||
xcb-util-cursor = "0.3.5"
|
|
||||||
smithay-client-toolkit = { version = "0.20.0", default-features = false }
|
smithay-client-toolkit = { version = "0.20.0", default-features = false }
|
||||||
|
|
||||||
fontconfig = { version = "0.10", optional = true }
|
fontconfig = { version = "0.10", optional = true }
|
||||||
|
|
|
||||||
|
|
@ -182,21 +182,21 @@ enum SurfaceRole {
|
||||||
impl SurfaceRole {
|
impl SurfaceRole {
|
||||||
fn xdg(&self) -> Option<&XdgSurfaceData> {
|
fn xdg(&self) -> Option<&XdgSurfaceData> {
|
||||||
match self {
|
match self {
|
||||||
SurfaceRole::Toplevel(ref t) => t.as_ref().map(|t| &t.xdg),
|
SurfaceRole::Toplevel(t) => t.as_ref().map(|t| &t.xdg),
|
||||||
SurfaceRole::Popup(ref p) => p.as_ref().map(|p| &p.xdg),
|
SurfaceRole::Popup(p) => p.as_ref().map(|p| &p.xdg),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn xdg_mut(&mut self) -> Option<&mut XdgSurfaceData> {
|
fn xdg_mut(&mut self) -> Option<&mut XdgSurfaceData> {
|
||||||
match self {
|
match self {
|
||||||
SurfaceRole::Toplevel(ref mut t) => t.as_mut().map(|t| &mut t.xdg),
|
SurfaceRole::Toplevel(t) => t.as_mut().map(|t| &mut t.xdg),
|
||||||
SurfaceRole::Popup(ref mut p) => p.as_mut().map(|p| &mut p.xdg),
|
SurfaceRole::Popup(p) => p.as_mut().map(|p| &mut p.xdg),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn destroy(&mut self) {
|
fn destroy(&mut self) {
|
||||||
match self {
|
match self {
|
||||||
SurfaceRole::Toplevel(Some(ref mut t)) => {
|
SurfaceRole::Toplevel(Some(t)) => {
|
||||||
if let Some(decoration) = t.decoration.wl.take() {
|
if let Some(decoration) = t.decoration.wl.take() {
|
||||||
decoration.destroy();
|
decoration.destroy();
|
||||||
}
|
}
|
||||||
|
|
@ -1092,7 +1092,7 @@ impl<S: X11Selection + 'static> InnerServerState<S> {
|
||||||
return;
|
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:?}");
|
warn!("Tried to set an unmapped toplevel or non toplevel fullscreen: {window:?}");
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -532,7 +532,7 @@ impl<T: SelectionType> SelectionDataImpl for SelectionData<T> {
|
||||||
let Some(CurrentSelection::Wayland(WaylandSelection {
|
let Some(CurrentSelection::Wayland(WaylandSelection {
|
||||||
mimes,
|
mimes,
|
||||||
inner,
|
inner,
|
||||||
ref mut incr_data,
|
incr_data,
|
||||||
})) = &mut self.current_selection
|
})) = &mut self.current_selection
|
||||||
else {
|
else {
|
||||||
warn!("Got selection request, but we don't seem to be the selection owner");
|
warn!("Got selection request, but we don't seem to be the selection owner");
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "testwl"
|
name = "testwl"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition.workspace = true
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
workspace = true
|
workspace = true
|
||||||
|
|
|
||||||
|
|
@ -120,8 +120,8 @@ pub struct SurfaceData {
|
||||||
impl SurfaceData {
|
impl SurfaceData {
|
||||||
pub fn xdg(&self) -> &XdgSurfaceData {
|
pub fn xdg(&self) -> &XdgSurfaceData {
|
||||||
match self.role.as_ref().expect("Surface missing role") {
|
match self.role.as_ref().expect("Surface missing role") {
|
||||||
SurfaceRole::Toplevel(ref t) => &t.xdg,
|
SurfaceRole::Toplevel(t) => &t.xdg,
|
||||||
SurfaceRole::Popup(ref p) => &p.xdg,
|
SurfaceRole::Popup(p) => &p.xdg,
|
||||||
SurfaceRole::Subsurface(_) => panic!("subsurface doesn't have an XdgSurface"),
|
SurfaceRole::Subsurface(_) => panic!("subsurface doesn't have an XdgSurface"),
|
||||||
SurfaceRole::Cursor => panic!("cursor surface 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 {
|
pub fn toplevel(&self) -> &Toplevel {
|
||||||
match self.role.as_ref().expect("Surface missing role") {
|
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:?}"),
|
other => panic!("Surface role was not toplevel: {other:?}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn popup(&self) -> &Popup {
|
pub fn popup(&self) -> &Popup {
|
||||||
match self.role.as_ref().expect("Surface missing role") {
|
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:?}"),
|
other => panic!("Surface role was not popup: {other:?}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue