cargo clippy everywhere

This commit is contained in:
Shawn Wallace 2025-07-12 12:29:33 -04:00
parent 07847e11d7
commit e4bb8c3f9d
7 changed files with 18 additions and 15 deletions

View file

@ -1199,8 +1199,7 @@ impl<C: XConnection> ServerState<C> {
let old_role_type = std::mem::discriminant(role);
assert_eq!(
new_role_type, old_role_type,
"Surface for {:?} already had a role: {:?}",
window, role
"Surface for {window:?} already had a role: {role:?}"
);
}

View file

@ -330,7 +330,7 @@ impl XState {
match event {
xcb::Event::X(x::Event::CreateNotify(e)) => {
debug!("new window: {:?}", e);
debug!("new window: {e:?}");
server_state.new_window(
e.window(),
e.override_redirect(),
@ -702,7 +702,7 @@ impl XState {
data.push(0);
}
let class = CString::from_vec_with_nul(data).unwrap();
trace!("{:?} class: {class:?}", window);
trace!("{window:?} class: {class:?}");
class.to_string_lossy().to_string()
};
PropertyCookieWrapper {
@ -1236,7 +1236,7 @@ impl XConnection for RealConnection {
revert_to: x::InputFocus::None,
time: x::CURRENT_TIME,
}) {
debug!("SetInputFocus failed ({:?}: {:?})", window, e);
debug!("SetInputFocus failed ({window:?}: {e:?})");
return;
}
if let Err(e) = self.connection.send_and_check_request(&x::ChangeProperty {
@ -1246,7 +1246,7 @@ impl XConnection for RealConnection {
r#type: x::ATOM_WINDOW,
data: &[window],
}) {
debug!("ChangeProperty failed ({:?}: {:?})", window, e);
debug!("ChangeProperty failed ({window:?}: {e:?})");
}
if let Err(e) = self.connection.send_and_check_request(&x::ChangeProperty {
mode: x::PropMode::Replace,
@ -1255,7 +1255,7 @@ impl XConnection for RealConnection {
r#type: self.atoms.wm_state,
data: &[WmState::Normal as u32, 0],
}) {
debug!("ChangeProperty failed ({:?}: {:?})", window, e);
debug!("ChangeProperty failed ({window:?}: {e:?})");
}
if let Some(name) = output_name {

View file

@ -386,7 +386,7 @@ impl XState {
let Some(target) = mimes.iter().find(|t| t.atom == other) else {
if log::log_enabled!(log::Level::Debug) {
let name = get_atom_name(&self.connection, other);
debug!("refusing selection request because given atom could not be found ({})", name);
debug!("refusing selection request because given atom could not be found ({name})");
}
refuse();
return true;
@ -447,7 +447,7 @@ impl XState {
}
fn handle_new_selection_owner(&mut self, owner: x::Window, timestamp: u32) {
debug!("new selection owner: {:?}", owner);
debug!("new selection owner: {owner:?}");
self.selection_data.last_selection_timestamp = timestamp;
// Grab targets
self.connection