mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 20:09:59 +03:00
clippy: inline format args
This commit is contained in:
@@ -535,7 +535,7 @@ impl State {
|
||||
fn update_windows(&mut self) {
|
||||
log::info!("active outputs: ");
|
||||
for output in self.outputs.iter().filter(|o| o.info.is_some()) {
|
||||
log::info!(" * {}", output);
|
||||
log::info!(" * {output}");
|
||||
}
|
||||
|
||||
self.active_windows.clear();
|
||||
@@ -582,17 +582,17 @@ impl Inner {
|
||||
match self.queue.dispatch_pending(&mut self.state) {
|
||||
Ok(_) => {}
|
||||
Err(DispatchError::Backend(WaylandError::Io(e))) => {
|
||||
log::error!("Wayland Error: {}", e);
|
||||
log::error!("Wayland Error: {e}");
|
||||
}
|
||||
Err(DispatchError::Backend(e)) => {
|
||||
panic!("backend error: {}", e);
|
||||
panic!("backend error: {e}");
|
||||
}
|
||||
Err(DispatchError::BadMessage {
|
||||
sender_id,
|
||||
interface,
|
||||
opcode,
|
||||
}) => {
|
||||
panic!("bad message {}, {} , {}", sender_id, interface, opcode);
|
||||
panic!("bad message {sender_id}, {interface} , {opcode}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -974,7 +974,7 @@ impl Dispatch<ZxdgOutputV1, u32> for State {
|
||||
.find(|o| o.global.name == *name)
|
||||
.expect("output");
|
||||
|
||||
log::debug!("xdg_output {name} - {:?}", event);
|
||||
log::debug!("xdg_output {name} - {event:?}");
|
||||
match event {
|
||||
zxdg_output_v1::Event::LogicalPosition { x, y } => {
|
||||
output.pending_info.position = (x, y);
|
||||
@@ -1010,7 +1010,7 @@ impl Dispatch<WlOutput, u32> for State {
|
||||
_conn: &Connection,
|
||||
_qhandle: &QueueHandle<Self>,
|
||||
) {
|
||||
log::debug!("wl_output {name} - {:?}", event);
|
||||
log::debug!("wl_output {name} - {event:?}");
|
||||
if let wl_output::Event::Done = event {
|
||||
state.update_output_info(*name);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ impl Display for Position {
|
||||
Position::Top => "top",
|
||||
Position::Bottom => "bottom",
|
||||
};
|
||||
write!(f, "{}", pos)
|
||||
write!(f, "{pos}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -161,12 +161,12 @@ fn get_display_at_point(x: CGFloat, y: CGFloat) -> Option<CGDirectDisplayID> {
|
||||
};
|
||||
|
||||
if error != 0 {
|
||||
log::warn!("error getting displays at point ({}, {}): {}", x, y, error);
|
||||
log::warn!("error getting displays at point ({x}, {y}): {error}");
|
||||
return Option::None;
|
||||
}
|
||||
|
||||
if display_count == 0 {
|
||||
log::debug!("no displays found at point ({}, {})", x, y);
|
||||
log::debug!("no displays found at point ({x}, {y})");
|
||||
return Option::None;
|
||||
}
|
||||
|
||||
|
||||
@@ -163,13 +163,13 @@ impl Emulation for WlrootsEmulation {
|
||||
async fn create(&mut self, handle: EmulationHandle) {
|
||||
self.state.add_client(handle);
|
||||
if let Err(e) = self.queue.flush() {
|
||||
log::error!("{}", e);
|
||||
log::error!("{e}");
|
||||
}
|
||||
}
|
||||
async fn destroy(&mut self, handle: EmulationHandle) {
|
||||
self.state.destroy_client(handle);
|
||||
if let Err(e) = self.queue.flush() {
|
||||
log::error!("{}", e);
|
||||
log::error!("{e}");
|
||||
}
|
||||
}
|
||||
async fn terminate(&mut self) {
|
||||
@@ -221,7 +221,7 @@ impl VirtualInput {
|
||||
self.keyboard.key(time, key, state as u32);
|
||||
if let Ok(mut mods) = self.modifiers.lock() {
|
||||
if mods.update_by_key_event(key, state) {
|
||||
log::trace!("Key triggers modifier change: {:?}", mods);
|
||||
log::trace!("Key triggers modifier change: {mods:?}");
|
||||
self.keyboard.modifiers(
|
||||
mods.mask_pressed().bits(),
|
||||
0,
|
||||
@@ -330,7 +330,7 @@ impl XMods {
|
||||
|
||||
fn update_by_key_event(&mut self, key: u32, state: u8) -> bool {
|
||||
if let Ok(key) = scancode::Linux::try_from(key) {
|
||||
log::trace!("Attempting to process modifier from: {:#?}", key);
|
||||
log::trace!("Attempting to process modifier from: {key:#?}");
|
||||
let pressed_mask = match key {
|
||||
scancode::Linux::KeyLeftShift | scancode::Linux::KeyRightShift => XMods::ShiftMask,
|
||||
scancode::Linux::KeyLeftCtrl | scancode::Linux::KeyRightCtrl => XMods::ControlMask,
|
||||
@@ -348,7 +348,7 @@ impl XMods {
|
||||
|
||||
// unchanged
|
||||
if pressed_mask.is_empty() && locked_mask.is_empty() {
|
||||
log::trace!("{:#?} is not a modifier key", key);
|
||||
log::trace!("{key:#?} is not a modifier key");
|
||||
return false;
|
||||
}
|
||||
match state {
|
||||
|
||||
@@ -112,8 +112,8 @@ impl Display for KeyboardEvent {
|
||||
impl Display for Event {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
Event::Pointer(p) => write!(f, "{}", p),
|
||||
Event::Keyboard(k) => write!(f, "{}", k),
|
||||
Event::Pointer(p) => write!(f, "{p}"),
|
||||
Event::Keyboard(k) => write!(f, "{k}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ impl Window {
|
||||
|
||||
pub(super) fn update_client_config(&self, handle: ClientHandle, client: ClientConfig) {
|
||||
let Some(row) = self.row_for_handle(handle) else {
|
||||
log::warn!("could not find row for handle {}", handle);
|
||||
log::warn!("could not find row for handle {handle}");
|
||||
return;
|
||||
};
|
||||
row.set_hostname(client.hostname);
|
||||
@@ -334,11 +334,11 @@ impl Window {
|
||||
|
||||
pub(super) fn update_client_state(&self, handle: ClientHandle, state: ClientState) {
|
||||
let Some(row) = self.row_for_handle(handle) else {
|
||||
log::warn!("could not find row for handle {}", handle);
|
||||
log::warn!("could not find row for handle {handle}");
|
||||
return;
|
||||
};
|
||||
let Some(client_object) = self.client_object_for_handle(handle) else {
|
||||
log::warn!("could not find row for handle {}", handle);
|
||||
log::warn!("could not find row for handle {handle}");
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ impl AsyncFrontendListener {
|
||||
let (socket_path, listener) = {
|
||||
let socket_path = crate::default_socket_path()?;
|
||||
|
||||
log::debug!("remove socket: {:?}", socket_path);
|
||||
log::debug!("remove socket: {socket_path:?}");
|
||||
if socket_path.exists() {
|
||||
// try to connect to see if some other instance
|
||||
// of lan-mouse is already running
|
||||
|
||||
@@ -264,7 +264,7 @@ async fn read_loop(
|
||||
}
|
||||
}
|
||||
}
|
||||
log::info!("dtls client disconnected {:?}", addr);
|
||||
log::info!("dtls client disconnected {addr:?}");
|
||||
let mut conns = conns.lock().await;
|
||||
let index = conns
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user