1
0
Fork 0
forked from wry/wry

all: use expect attribute where possible

This commit is contained in:
Julian Orth 2024-09-06 11:08:22 +02:00
parent c3b50dc653
commit e377470f3f
134 changed files with 241 additions and 296 deletions

View file

@ -714,7 +714,7 @@ trait NodeSelectorUsecase: Sized + 'static {
fn node_focus(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>, node: &Rc<dyn Node>);
}
impl<U: NodeSelectorUsecase + ?Sized> SimplePointerOwnerUsecase for Rc<U> {
impl<U: NodeSelectorUsecase> SimplePointerOwnerUsecase for Rc<U> {
const FIND_TREE_USECASE: FindTreeUsecase = <U as NodeSelectorUsecase>::FIND_TREE_USECASE;
const IS_DEFAULT: bool = false;

View file

@ -127,7 +127,7 @@ pub enum TabletToolType {
Brush,
Pencil,
Airbrush,
#[allow(dead_code)]
#[expect(dead_code)]
Finger,
Mouse,
Lens,

View file

@ -14,7 +14,7 @@ use {
pub const REPEAT_INFO_SINCE: Version = Version(4);
#[allow(dead_code)]
#[expect(dead_code)]
const NO_KEYMAP: u32 = 0;
pub const XKB_V1: u32 = 1;

View file

@ -12,7 +12,7 @@ use {
thiserror::Error,
};
#[allow(dead_code)]
#[expect(dead_code)]
const ROLE: u32 = 0;
pub(super) const RELEASED: u32 = 0;
@ -24,7 +24,6 @@ pub const HORIZONTAL_SCROLL: u32 = 1;
pub const WHEEL: u32 = 0;
pub const FINGER: u32 = 1;
pub const CONTINUOUS: u32 = 2;
#[allow(dead_code)]
pub const WHEEL_TILT: u32 = 3;
pub const IDENTICAL: u32 = 0;

View file

@ -11,9 +11,9 @@ use {
thiserror::Error,
};
#[allow(dead_code)]
#[expect(dead_code)]
pub const SHAPE_SINCE_VERSION: Version = Version(6);
#[allow(dead_code)]
#[expect(dead_code)]
pub const ORIENTATION_DIRECTION_SINCE_VERSION: Version = Version(6);
pub struct WlTouch {
@ -78,7 +78,7 @@ impl WlTouch {
self.seat.client.event(Cancel { self_id: self.id })
}
#[allow(dead_code)]
#[expect(dead_code)]
pub fn send_shape(&self, id: i32, major: Fixed, minor: Fixed) {
self.seat.client.event(Shape {
self_id: self.id,
@ -88,7 +88,7 @@ impl WlTouch {
})
}
#[allow(dead_code)]
#[expect(dead_code)]
pub fn send_orientation(&self, id: i32, orientation: Fixed) {
self.seat.client.event(Orientation {
self_id: self.id,