address clippy lints

This commit is contained in:
Ferdinand Schober
2023-12-10 15:23:57 +01:00
parent 5c8ea25563
commit ebf5a64f20
13 changed files with 116 additions and 117 deletions

View File

@@ -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,
});
})
}
}

View File

@@ -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));
}
}
}

View File

@@ -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) {