Update to Rust 2024

Bumps MSRV to 1.85.
This commit is contained in:
Shawn Wallace 2026-01-18 14:18:10 -05:00
parent 645ca1125b
commit 1979beaa39
6 changed files with 20 additions and 21 deletions

View file

@ -1,7 +1,7 @@
[package]
name = "testwl"
version = "0.1.0"
edition = "2021"
edition.workspace = true
[lints]
workspace = true

View file

@ -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:?}"),
}
}