all: set rust edition to 2024
This commit is contained in:
parent
02a18f620b
commit
3338909170
515 changed files with 1225 additions and 1187 deletions
|
|
@ -1,5 +1,6 @@
|
|||
use {
|
||||
crate::libinput::{
|
||||
LibInput,
|
||||
consts::{
|
||||
AccelProfile, ConfigDragLockState, ConfigDragState, ConfigTapState, DeviceCapability,
|
||||
LIBINPUT_CONFIG_DRAG_DISABLED, LIBINPUT_CONFIG_DRAG_ENABLED,
|
||||
|
|
@ -37,7 +38,6 @@ use {
|
|||
libinput_tablet_pad_mode_group_has_button, libinput_tablet_pad_mode_group_has_ring,
|
||||
libinput_tablet_pad_mode_group_has_strip,
|
||||
},
|
||||
LibInput,
|
||||
},
|
||||
bstr::ByteSlice,
|
||||
std::{ffi::CStr, marker::PhantomData, rc::Rc},
|
||||
|
|
@ -80,11 +80,7 @@ impl<'a> LibInputDevice<'a> {
|
|||
|
||||
pub fn slot(&self) -> Option<usize> {
|
||||
let res = unsafe { libinput_device_get_user_data(self.dev) as usize };
|
||||
if res == 0 {
|
||||
None
|
||||
} else {
|
||||
Some(res - 1)
|
||||
}
|
||||
if res == 0 { None } else { Some(res - 1) }
|
||||
}
|
||||
|
||||
pub fn has_cap(&self, cap: DeviceCapability) -> bool {
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@ unsafe extern "C" {
|
|||
index: c::c_uint,
|
||||
) -> *mut libinput_tablet_pad_mode_group;
|
||||
pub fn libinput_device_tablet_pad_get_num_mode_groups(device: *mut libinput_device)
|
||||
-> c::c_int;
|
||||
-> c::c_int;
|
||||
pub fn libinput_device_tablet_pad_get_num_buttons(device: *mut libinput_device) -> c::c_int;
|
||||
pub fn libinput_device_tablet_pad_get_num_rings(device: *mut libinput_device) -> c::c_int;
|
||||
pub fn libinput_device_tablet_pad_get_num_strips(device: *mut libinput_device) -> c::c_int;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue