mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-29 08:00:55 +03:00
address clippy lints
This commit is contained in:
@@ -80,7 +80,7 @@ impl LibeiConsumer {
|
||||
let context = ei::Context::new(stream)?;
|
||||
context.flush()?;
|
||||
let events = EiEventStream::new(context.clone())?;
|
||||
return Ok(Self {
|
||||
Ok(Self {
|
||||
handshake: false,
|
||||
context,
|
||||
events,
|
||||
@@ -96,7 +96,7 @@ impl LibeiConsumer {
|
||||
capability_mask: 0,
|
||||
sequence: 0,
|
||||
serial: 0,
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ impl VirtualInput {
|
||||
// insert a frame event after each mouse event
|
||||
pointer.frame();
|
||||
}
|
||||
_ => {}
|
||||
VirtualInput::Kde { .. } => {}
|
||||
}
|
||||
}
|
||||
Event::Keyboard(e) => match e {
|
||||
@@ -330,11 +330,8 @@ impl Dispatch<WlKeyboard, ()> for State {
|
||||
_: &Connection,
|
||||
_: &QueueHandle<Self>,
|
||||
) {
|
||||
match event {
|
||||
wl_keyboard::Event::Keymap { format, fd, size } => {
|
||||
state.keymap = Some((u32::from(format), fd, size));
|
||||
}
|
||||
_ => {}
|
||||
if let wl_keyboard::Event::Keymap { format, fd, size } = event {
|
||||
state.keymap = Some((u32::from(format), fd, size));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,12 @@ impl X11Consumer {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for X11Consumer {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl EventConsumer for X11Consumer {
|
||||
async fn consume(&mut self, event: Event, _: ClientHandle) {
|
||||
|
||||
Reference in New Issue
Block a user