Skip to content

Commit 0df5bda

Browse files
committed
examples/dialog: Fix unused warnings
1 parent 8506e39 commit 0df5bda

1 file changed

Lines changed: 36 additions & 40 deletions

File tree

examples/dialog.rs

Lines changed: 36 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
use std::collections::hash_map::RandomState;
2-
use std::env;
3-
use std::hash::{BuildHasher, Hasher};
4-
51
use smithay_client_toolkit::reexports::calloop::{EventLoop, LoopHandle};
62
use smithay_client_toolkit::seat::keyboard::KeyboardHandler;
73
use smithay_client_toolkit::seat::{Capability, SeatHandler, SeatState};
@@ -348,7 +344,7 @@ impl DialogHandler for State {
348344
qh: &QueueHandle<Self>,
349345
window: &smithay_client_toolkit::shell::xdg::dialog::Dialog,
350346
configure: WindowConfigure,
351-
serial: u32,
347+
_serial: u32,
352348
) {
353349
for viewer in &mut self.windows {
354350
if viewer.window != *window {
@@ -368,8 +364,8 @@ impl DialogHandler for State {
368364

369365
fn request_close(
370366
&mut self,
371-
conn: &Connection,
372-
qh: &QueueHandle<Self>,
367+
_conn: &Connection,
368+
_qh: &QueueHandle<Self>,
373369
window: &smithay_client_toolkit::shell::xdg::dialog::Dialog,
374370
) {
375371
println!("Closing a Popup");
@@ -430,33 +426,33 @@ impl SeatHandler for State {
430426
impl KeyboardHandler for State {
431427
fn enter(
432428
&mut self,
433-
conn: &Connection,
434-
qh: &QueueHandle<Self>,
435-
keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
436-
surface: &wl_surface::WlSurface,
437-
serial: u32,
438-
raw: &[u32],
439-
keysyms: &[xkeysym::Keysym],
429+
_conn: &Connection,
430+
_qh: &QueueHandle<Self>,
431+
_keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
432+
_surface: &wl_surface::WlSurface,
433+
_serial: u32,
434+
_raw: &[u32],
435+
_keysyms: &[xkeysym::Keysym],
440436
) {
441437
}
442438

443439
fn leave(
444440
&mut self,
445-
conn: &Connection,
446-
qh: &QueueHandle<Self>,
447-
keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
448-
surface: &wl_surface::WlSurface,
449-
serial: u32,
441+
_conn: &Connection,
442+
_qh: &QueueHandle<Self>,
443+
_keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
444+
_surface: &wl_surface::WlSurface,
445+
_serial: u32,
450446
) {
451447
}
452448

453449
fn press_key(
454450
&mut self,
455-
conn: &Connection,
451+
_conn: &Connection,
456452
qh: &QueueHandle<Self>,
457-
keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
458-
serial: u32,
459-
event: smithay_client_toolkit::seat::keyboard::KeyEvent,
453+
_keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
454+
_serial: u32,
455+
_event: smithay_client_toolkit::seat::keyboard::KeyEvent,
460456
) {
461457
if self.have_dialog {
462458
// Close the dialog
@@ -489,21 +485,21 @@ impl KeyboardHandler for State {
489485

490486
fn release_key(
491487
&mut self,
492-
conn: &Connection,
493-
qh: &QueueHandle<Self>,
494-
keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
495-
serial: u32,
496-
event: smithay_client_toolkit::seat::keyboard::KeyEvent,
488+
_conn: &Connection,
489+
_qh: &QueueHandle<Self>,
490+
_keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
491+
_serial: u32,
492+
_event: smithay_client_toolkit::seat::keyboard::KeyEvent,
497493
) {
498494
}
499495

500496
fn repeat_key(
501497
&mut self,
502-
conn: &Connection,
503-
qh: &QueueHandle<Self>,
504-
keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
505-
serial: u32,
506-
event: smithay_client_toolkit::seat::keyboard::KeyEvent,
498+
_conn: &Connection,
499+
_qh: &QueueHandle<Self>,
500+
_keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
501+
_serial: u32,
502+
_event: smithay_client_toolkit::seat::keyboard::KeyEvent,
507503
) {
508504
}
509505

@@ -518,13 +514,13 @@ impl KeyboardHandler for State {
518514

519515
fn update_modifiers(
520516
&mut self,
521-
conn: &Connection,
522-
qh: &QueueHandle<Self>,
523-
keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
524-
serial: u32,
525-
modifiers: smithay_client_toolkit::seat::keyboard::Modifiers,
526-
raw_modifiers: smithay_client_toolkit::seat::keyboard::RawModifiers,
527-
layout: u32,
517+
_conn: &Connection,
518+
_qh: &QueueHandle<Self>,
519+
_keyboard: &wayland_client::protocol::wl_keyboard::WlKeyboard,
520+
_serial: u32,
521+
_modifiers: smithay_client_toolkit::seat::keyboard::Modifiers,
522+
_raw_modifiers: smithay_client_toolkit::seat::keyboard::RawModifiers,
523+
_layout: u32,
528524
) {
529525
}
530526

0 commit comments

Comments
 (0)