chore: clippy
This commit is contained in:
parent
c13e52da04
commit
2ca99c670a
59 changed files with 1974 additions and 2137 deletions
|
|
@ -112,12 +112,12 @@ impl Devices {
|
|||
.collect::<Vec<_>>();
|
||||
map.insert(id, caps);
|
||||
|
||||
if device.has_capability(DeviceCapability::Keyboard) {
|
||||
if let Some(device) = <dyn Any>::downcast_ref::<InputDevice>(device) {
|
||||
let mut device = device.clone();
|
||||
device.led_update(led_state.into());
|
||||
self.keyboards.borrow_mut().push(device);
|
||||
}
|
||||
if device.has_capability(DeviceCapability::Keyboard)
|
||||
&& let Some(device) = <dyn Any>::downcast_ref::<InputDevice>(device)
|
||||
{
|
||||
let mut device = device.clone();
|
||||
device.led_update(led_state.into());
|
||||
self.keyboards.borrow_mut().push(device);
|
||||
}
|
||||
|
||||
new_caps
|
||||
|
|
@ -385,10 +385,10 @@ impl SeatExt for Seat<State> {
|
|||
let lock = self.user_data().get::<Mutex<CursorImageStatus>>().unwrap();
|
||||
// Reset the cursor if the surface is no longer alive
|
||||
let mut cursor_status = lock.lock().unwrap();
|
||||
if let CursorImageStatus::Surface(ref surface) = *cursor_status {
|
||||
if !surface.alive() {
|
||||
*cursor_status = CursorImageStatus::default_named();
|
||||
}
|
||||
if let CursorImageStatus::Surface(ref surface) = *cursor_status
|
||||
&& !surface.alive()
|
||||
{
|
||||
*cursor_status = CursorImageStatus::default_named();
|
||||
}
|
||||
cursor_status.clone()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue