all: set rust edition to 2024
This commit is contained in:
parent
02a18f620b
commit
3338909170
515 changed files with 1225 additions and 1187 deletions
|
|
@ -21,9 +21,9 @@ use {
|
|||
queue::AsyncQueue,
|
||||
},
|
||||
video::drm::{
|
||||
DrmError,
|
||||
sync_obj::{SyncObj, SyncObjPoint},
|
||||
wait_for_sync_obj::{SyncObjWaiter, WaitForSyncObj, WaitForSyncObjHandle},
|
||||
DrmError,
|
||||
},
|
||||
},
|
||||
isnt::std_1::{primitive::IsntSliceExt, vec::IsntVecExt},
|
||||
|
|
@ -36,7 +36,7 @@ use {
|
|||
slice,
|
||||
},
|
||||
thiserror::Error,
|
||||
uapi::{c::c_short, OwnedFd},
|
||||
uapi::{OwnedFd, c::c_short},
|
||||
};
|
||||
|
||||
const MAX_TIMELINE_DEPTH: usize = 256;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use {
|
|||
rect::Rect,
|
||||
tree::{FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId, NodeVisitor},
|
||||
utils::numcell::NumCell,
|
||||
wire::{ext_session_lock_surface_v1::*, ExtSessionLockSurfaceV1Id, WlSurfaceId},
|
||||
wire::{ExtSessionLockSurfaceV1Id, WlSurfaceId, ext_session_lock_surface_v1::*},
|
||||
},
|
||||
std::rc::Rc,
|
||||
thiserror::Error,
|
||||
|
|
@ -157,7 +157,9 @@ pub enum ExtSessionLockSurfaceV1Error {
|
|||
ClientError(Box<ClientError>),
|
||||
#[error(transparent)]
|
||||
WlSurfaceError(#[from] WlSurfaceError),
|
||||
#[error("Surface {0} cannot be turned into an ext_session_lock_surface because it already has an attached ext_session_lock_surface")]
|
||||
#[error(
|
||||
"Surface {0} cannot be turned into an ext_session_lock_surface because it already has an attached ext_session_lock_surface"
|
||||
)]
|
||||
AlreadyAttached(WlSurfaceId),
|
||||
}
|
||||
efrom!(ExtSessionLockSurfaceV1Error, ClientError);
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ use {
|
|||
wl_output::OutputGlobalOpt,
|
||||
wl_seat::{NodeSeatState, WlSeatGlobal},
|
||||
wl_surface::{
|
||||
xdg_surface::xdg_popup::{XdgPopup, XdgPopupParent},
|
||||
PendingState, SurfaceExt, SurfaceRole, WlSurface, WlSurfaceError,
|
||||
xdg_surface::xdg_popup::{XdgPopup, XdgPopupParent},
|
||||
},
|
||||
},
|
||||
rect::Rect,
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ use {
|
|||
ifs::{
|
||||
wl_output::OutputGlobalOpt,
|
||||
wl_surface::{
|
||||
tray::{
|
||||
ack_configure, destroy, get_popup, install, DynTrayItem, FocusHint, Popup,
|
||||
TrayItem, TrayItemData, TrayItemError,
|
||||
},
|
||||
WlSurface,
|
||||
tray::{
|
||||
DynTrayItem, FocusHint, Popup, TrayItem, TrayItemData, TrayItemError,
|
||||
ack_configure, destroy, get_popup, install,
|
||||
},
|
||||
},
|
||||
xdg_positioner::{ANCHOR_BOTTOM_LEFT, ANCHOR_BOTTOM_RIGHT},
|
||||
},
|
||||
|
|
@ -15,7 +15,7 @@ use {
|
|||
object::{Object, Version},
|
||||
tree::NodeVisitor,
|
||||
utils::copyhashmap::CopyHashMap,
|
||||
wire::{jay_tray_item_v1::*, JayTrayItemV1Id, XdgPopupId},
|
||||
wire::{JayTrayItemV1Id, XdgPopupId, jay_tray_item_v1::*},
|
||||
},
|
||||
std::rc::Rc,
|
||||
thiserror::Error,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use {
|
|||
linkedlist::{LinkedNode, NodeRef},
|
||||
numcell::NumCell,
|
||||
},
|
||||
wire::{wl_subsurface::*, WlSubsurfaceId},
|
||||
wire::{WlSubsurfaceId, wl_subsurface::*},
|
||||
},
|
||||
std::{
|
||||
cell::{Cell, RefCell, RefMut},
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use {
|
|||
ifs::wl_surface::WlSurface,
|
||||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
wire::{wp_alpha_modifier_surface_v1::*, WpAlphaModifierSurfaceV1Id},
|
||||
wire::{WpAlphaModifierSurfaceV1Id, wp_alpha_modifier_surface_v1::*},
|
||||
},
|
||||
std::rc::Rc,
|
||||
thiserror::Error,
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ use {
|
|||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
wire::{
|
||||
wp_commit_timer_v1::{Destroy, SetTimestamp, WpCommitTimerV1RequestHandler},
|
||||
WpCommitTimerV1Id,
|
||||
wp_commit_timer_v1::{Destroy, SetTimestamp, WpCommitTimerV1RequestHandler},
|
||||
},
|
||||
},
|
||||
std::rc::Rc,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use {
|
|||
ifs::wl_surface::WlSurface,
|
||||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
wire::{wp_fifo_v1::*, WpFifoV1Id},
|
||||
wire::{WpFifoV1Id, wp_fifo_v1::*},
|
||||
},
|
||||
std::rc::Rc,
|
||||
thiserror::Error,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use {
|
|||
object::{Object, Version},
|
||||
scale::Scale,
|
||||
utils::cell_ext::CellExt,
|
||||
wire::{wp_fractional_scale_v1::*, WpFractionalScaleV1Id},
|
||||
wire::{WpFractionalScaleV1Id, wp_fractional_scale_v1::*},
|
||||
},
|
||||
std::rc::Rc,
|
||||
thiserror::Error,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use {
|
|||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
video::drm::sync_obj::SyncObjPoint,
|
||||
wire::{wp_linux_drm_syncobj_surface_v1::*, WpLinuxDrmSyncobjSurfaceV1Id},
|
||||
wire::{WpLinuxDrmSyncobjSurfaceV1Id, wp_linux_drm_syncobj_surface_v1::*},
|
||||
},
|
||||
std::rc::Rc,
|
||||
thiserror::Error,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use {
|
|||
ifs::wl_surface::WlSurface,
|
||||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
wire::{wp_tearing_control_v1::*, WlSurfaceId, WpTearingControlV1Id},
|
||||
wire::{WlSurfaceId, WpTearingControlV1Id, wp_tearing_control_v1::*},
|
||||
},
|
||||
std::{fmt::Debug, rc::Rc},
|
||||
thiserror::Error,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use {
|
|||
ifs::wl_surface::WlSurface,
|
||||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
wire::{wp_viewport::*, WpViewportId},
|
||||
wire::{WpViewportId, wp_viewport::*},
|
||||
},
|
||||
std::rc::Rc,
|
||||
thiserror::Error,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
use {
|
||||
crate::{
|
||||
ifs::wl_surface::{
|
||||
x_surface::{xwayland_surface_v1::XwaylandSurfaceV1, xwindow::Xwindow},
|
||||
SurfaceExt, WlSurface, WlSurfaceError,
|
||||
x_surface::{xwayland_surface_v1::XwaylandSurfaceV1, xwindow::Xwindow},
|
||||
},
|
||||
leaks::Tracker,
|
||||
tree::{Node, ToplevelNode, ToplevelNodeBase},
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
use {
|
||||
crate::{
|
||||
client::{Client, ClientError},
|
||||
ifs::wl_surface::{x_surface::XSurface, WlSurfaceError},
|
||||
ifs::wl_surface::{WlSurfaceError, x_surface::XSurface},
|
||||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
utils::cell_ext::CellExt,
|
||||
wire::{xwayland_surface_v1::*, XwaylandSurfaceV1Id},
|
||||
wire::{XwaylandSurfaceV1Id, xwayland_surface_v1::*},
|
||||
},
|
||||
std::rc::Rc,
|
||||
thiserror::Error,
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@ use {
|
|||
cursor::KnownCursor,
|
||||
fixed::Fixed,
|
||||
ifs::{
|
||||
wl_seat::{tablet::TabletTool, NodeSeatState, WlSeatGlobal},
|
||||
wl_surface::{x_surface::XSurface, WlSurface, WlSurfaceError},
|
||||
wl_seat::{NodeSeatState, WlSeatGlobal, tablet::TabletTool},
|
||||
wl_surface::{WlSurface, WlSurfaceError, x_surface::XSurface},
|
||||
},
|
||||
rect::Rect,
|
||||
renderer::Renderer,
|
||||
state::State,
|
||||
tree::{
|
||||
default_tile_drag_destination, ContainerSplit, Direction, FindTreeResult,
|
||||
FindTreeUsecase, FoundNode, Node, NodeId, NodeVisitor, StackedNode,
|
||||
TileDragDestination, ToplevelData, ToplevelNode, ToplevelNodeBase, WorkspaceNode,
|
||||
ContainerSplit, Direction, FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId,
|
||||
NodeVisitor, StackedNode, TileDragDestination, ToplevelData, ToplevelNode,
|
||||
ToplevelNodeBase, WorkspaceNode, default_tile_drag_destination,
|
||||
},
|
||||
utils::{clonecell::CloneCell, copyhashmap::CopyHashMap, linkedlist::LinkedNode},
|
||||
wire::WlSurfaceId,
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ use {
|
|||
client::ClientError,
|
||||
ifs::{
|
||||
wl_surface::{
|
||||
PendingState, SurfaceExt, SurfaceRole, WlSurface, WlSurfaceError,
|
||||
tray::TrayItemId,
|
||||
xdg_surface::{
|
||||
xdg_popup::{XdgPopup, XdgPopupError, XdgPopupParent},
|
||||
xdg_toplevel::{XdgToplevel, WM_CAPABILITIES_SINCE},
|
||||
xdg_toplevel::{WM_CAPABILITIES_SINCE, XdgToplevel},
|
||||
},
|
||||
PendingState, SurfaceExt, SurfaceRole, WlSurface, WlSurfaceError,
|
||||
},
|
||||
xdg_wm_base::XdgWmBase,
|
||||
},
|
||||
|
|
@ -28,7 +28,7 @@ use {
|
|||
option_ext::OptionExt,
|
||||
rc_eq::rc_eq,
|
||||
},
|
||||
wire::{xdg_surface::*, WlSurfaceId, XdgPopupId, XdgSurfaceId},
|
||||
wire::{WlSurfaceId, XdgPopupId, XdgSurfaceId, xdg_surface::*},
|
||||
},
|
||||
std::{
|
||||
cell::{Cell, RefCell, RefMut},
|
||||
|
|
@ -254,7 +254,7 @@ impl XdgSurface {
|
|||
id: self.id,
|
||||
old,
|
||||
new,
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
self.role.set(role);
|
||||
|
|
@ -551,7 +551,9 @@ impl SurfaceExt for XdgSurface {
|
|||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum XdgSurfaceError {
|
||||
#[error("Surface {0} cannot be turned into a xdg_surface because it already has an attached xdg_surface")]
|
||||
#[error(
|
||||
"Surface {0} cannot be turned into a xdg_surface because it already has an attached xdg_surface"
|
||||
)]
|
||||
AlreadyAttached(WlSurfaceId),
|
||||
#[error(transparent)]
|
||||
XdgPopupError(#[from] XdgPopupError),
|
||||
|
|
@ -565,7 +567,9 @@ pub enum XdgSurfaceError {
|
|||
ClientError(Box<ClientError>),
|
||||
#[error("Tried no set a non-positive width/height")]
|
||||
NonPositiveWidthHeight,
|
||||
#[error("Cannot destroy xdg_surface {0} because it's associated xdg_toplevel/popup is not yet destroyed")]
|
||||
#[error(
|
||||
"Cannot destroy xdg_surface {0} because it's associated xdg_toplevel/popup is not yet destroyed"
|
||||
)]
|
||||
RoleNotYetDestroyed(XdgSurfaceId),
|
||||
#[error("The surface still has popups attached")]
|
||||
PopupsNotYetDestroyed,
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ use {
|
|||
cursor::KnownCursor,
|
||||
fixed::Fixed,
|
||||
ifs::{
|
||||
wl_seat::{tablet::TabletTool, NodeSeatState, WlSeatGlobal},
|
||||
wl_seat::{NodeSeatState, WlSeatGlobal, tablet::TabletTool},
|
||||
wl_surface::{
|
||||
tray::TrayItemId,
|
||||
xdg_surface::{XdgSurface, XdgSurfaceError, XdgSurfaceExt},
|
||||
},
|
||||
xdg_positioner::{
|
||||
XdgPositioned, XdgPositioner, CA_FLIP_X, CA_FLIP_Y, CA_RESIZE_X, CA_RESIZE_Y,
|
||||
CA_SLIDE_X, CA_SLIDE_Y,
|
||||
CA_FLIP_X, CA_FLIP_Y, CA_RESIZE_X, CA_RESIZE_Y, CA_SLIDE_X, CA_SLIDE_Y,
|
||||
XdgPositioned, XdgPositioner,
|
||||
},
|
||||
},
|
||||
leaks::Tracker,
|
||||
|
|
@ -23,7 +23,7 @@ use {
|
|||
StackedNode,
|
||||
},
|
||||
utils::clonecell::CloneCell,
|
||||
wire::{xdg_popup::*, XdgPopupId},
|
||||
wire::{XdgPopupId, xdg_popup::*},
|
||||
},
|
||||
std::{
|
||||
cell::{Cell, RefCell},
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ use {
|
|||
fixed::Fixed,
|
||||
ifs::{
|
||||
ext_foreign_toplevel_list_v1::ExtForeignToplevelListV1,
|
||||
wl_seat::{tablet::TabletTool, NodeSeatState, WlSeatGlobal},
|
||||
wl_seat::{NodeSeatState, WlSeatGlobal, tablet::TabletTool},
|
||||
wl_surface::{
|
||||
xdg_surface::{
|
||||
xdg_toplevel::xdg_dialog_v1::XdgDialogV1, XdgSurface, XdgSurfaceError,
|
||||
XdgSurfaceExt,
|
||||
},
|
||||
WlSurface,
|
||||
xdg_surface::{
|
||||
XdgSurface, XdgSurfaceError, XdgSurfaceExt,
|
||||
xdg_toplevel::xdg_dialog_v1::XdgDialogV1,
|
||||
},
|
||||
},
|
||||
xdg_toplevel_drag_v1::XdgToplevelDragV1,
|
||||
},
|
||||
|
|
@ -25,12 +25,12 @@ use {
|
|||
renderer::Renderer,
|
||||
state::State,
|
||||
tree::{
|
||||
default_tile_drag_destination, ContainerSplit, Direction, FindTreeResult,
|
||||
FindTreeUsecase, FoundNode, Node, NodeId, NodeVisitor, OutputNode, TileDragDestination,
|
||||
ToplevelData, ToplevelNode, ToplevelNodeBase, ToplevelNodeId, WorkspaceNode,
|
||||
ContainerSplit, Direction, FindTreeResult, FindTreeUsecase, FoundNode, Node, NodeId,
|
||||
NodeVisitor, OutputNode, TileDragDestination, ToplevelData, ToplevelNode,
|
||||
ToplevelNodeBase, ToplevelNodeId, WorkspaceNode, default_tile_drag_destination,
|
||||
},
|
||||
utils::{clonecell::CloneCell, hash_map_ext::HashMapExt},
|
||||
wire::{xdg_toplevel::*, XdgToplevelId},
|
||||
wire::{XdgToplevelId, xdg_toplevel::*},
|
||||
},
|
||||
ahash::{AHashMap, AHashSet},
|
||||
num_derive::FromPrimitive,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use {
|
|||
ifs::wl_surface::xdg_surface::xdg_toplevel::XdgToplevel,
|
||||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
wire::{xdg_dialog_v1::*, XdgDialogV1Id, XdgToplevelId},
|
||||
wire::{XdgDialogV1Id, XdgToplevelId, xdg_dialog_v1::*},
|
||||
},
|
||||
std::{fmt::Debug, rc::Rc},
|
||||
thiserror::Error,
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ use {
|
|||
crate::{
|
||||
client::{Client, ClientError},
|
||||
globals::{Global, GlobalName},
|
||||
ifs::wl_surface::{x_surface::xwayland_surface_v1::XwaylandSurfaceV1, WlSurfaceError},
|
||||
ifs::wl_surface::{WlSurfaceError, x_surface::xwayland_surface_v1::XwaylandSurfaceV1},
|
||||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
wire::{xwayland_shell_v1::*, WlSurfaceId, XwaylandShellV1Id},
|
||||
wire::{WlSurfaceId, XwaylandShellV1Id, xwayland_shell_v1::*},
|
||||
},
|
||||
std::rc::Rc,
|
||||
thiserror::Error,
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ use {
|
|||
wl_output::OutputGlobalOpt,
|
||||
wl_seat::NodeSeatState,
|
||||
wl_surface::{
|
||||
xdg_surface::xdg_popup::{XdgPopup, XdgPopupParent},
|
||||
PendingState, SurfaceExt, SurfaceRole, WlSurface, WlSurfaceError,
|
||||
xdg_surface::xdg_popup::{XdgPopup, XdgPopupParent},
|
||||
},
|
||||
zwlr_layer_shell_v1::{ZwlrLayerShellV1, OVERLAY},
|
||||
zwlr_layer_shell_v1::{OVERLAY, ZwlrLayerShellV1},
|
||||
},
|
||||
leaks::Tracker,
|
||||
object::Object,
|
||||
|
|
@ -26,7 +26,7 @@ use {
|
|||
numcell::NumCell,
|
||||
option_ext::OptionExt,
|
||||
},
|
||||
wire::{zwlr_layer_surface_v1::*, WlSurfaceId, XdgPopupId, ZwlrLayerSurfaceV1Id},
|
||||
wire::{WlSurfaceId, XdgPopupId, ZwlrLayerSurfaceV1Id, zwlr_layer_surface_v1::*},
|
||||
},
|
||||
std::{
|
||||
cell::{Cell, RefCell, RefMut},
|
||||
|
|
@ -723,7 +723,9 @@ simple_add_obj!(ZwlrLayerSurfaceV1);
|
|||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum ZwlrLayerSurfaceV1Error {
|
||||
#[error("Surface {0} cannot be turned into a zwlr_layer_surface because it already has an attached zwlr_layer_surface")]
|
||||
#[error(
|
||||
"Surface {0} cannot be turned into a zwlr_layer_surface because it already has an attached zwlr_layer_surface"
|
||||
)]
|
||||
AlreadyAttached(WlSurfaceId),
|
||||
#[error("Width was set to 0 but anchor did not contain LEFT and RIGHT")]
|
||||
WidthZero,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use {
|
|||
ifs::wl_surface::WlSurface,
|
||||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
wire::{zwp_idle_inhibitor_v1::*, ZwpIdleInhibitorV1Id},
|
||||
wire::{ZwpIdleInhibitorV1Id, zwp_idle_inhibitor_v1::*},
|
||||
},
|
||||
std::rc::Rc,
|
||||
thiserror::Error,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use {
|
|||
object::{Object, Version},
|
||||
rect::Rect,
|
||||
state::State,
|
||||
wire::{zwp_input_popup_surface_v2::*, WlSurfaceId, ZwpInputPopupSurfaceV2Id},
|
||||
wire::{WlSurfaceId, ZwpInputPopupSurfaceV2Id, zwp_input_popup_surface_v2::*},
|
||||
},
|
||||
std::{cell::Cell, rc::Rc},
|
||||
thiserror::Error,
|
||||
|
|
@ -183,7 +183,9 @@ pub enum ZwpInputPopupSurfaceV2Error {
|
|||
ClientError(Box<ClientError>),
|
||||
#[error(transparent)]
|
||||
WlSurfaceError(Box<WlSurfaceError>),
|
||||
#[error("Surface {0} cannot be turned into a zwp_input_popup_surface_v2 because it already has an attached zwp_input_popup_surface_v2")]
|
||||
#[error(
|
||||
"Surface {0} cannot be turned into a zwp_input_popup_surface_v2 because it already has an attached zwp_input_popup_surface_v2"
|
||||
)]
|
||||
AlreadyAttached(WlSurfaceId),
|
||||
}
|
||||
efrom!(ZwpInputPopupSurfaceV2Error, WlSurfaceError);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue