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

@ -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<S: X11Selection + 'static> InnerServerState<S> {
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;
};

View file

@ -532,7 +532,7 @@ impl<T: SelectionType> SelectionDataImpl for SelectionData<T> {
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");