summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-06-27 00:14:53 +0100
committertcmal <me@aria.rip>2024-06-27 00:14:53 +0100
commit0e0725038dc645e4e0846f9a0de8d0b8a932e03d (patch)
tree9ebeb518f535f29493fd8c77ecf9ab7eaa7cc912 /src
parent6d0af908b2ac28cef7b43e3a5624ef5bc96f83b1 (diff)
lints
Diffstat (limited to 'src')
-rw-r--r--src/config.rs2
-rw-r--r--src/conn_info/mod.rs5
-rw-r--r--src/log.rs4
-rw-r--r--src/main.rs6
4 files changed, 8 insertions, 9 deletions
diff --git a/src/config.rs b/src/config.rs
index d1bd350..0fc7144 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -7,7 +7,7 @@ use xkeysym::Keysym;
use crate::{
bind,
conn_info::Colour,
- helpers::*,
+ helpers::{focus_next, focus_prev, spawn},
keys::{Keybind, Keybinds},
};
diff --git a/src/conn_info/mod.rs b/src/conn_info/mod.rs
index ce7934b..ac257d4 100644
--- a/src/conn_info/mod.rs
+++ b/src/conn_info/mod.rs
@@ -186,7 +186,7 @@ impl<'a> Connection<'a> {
property: self.atoms.wm_protocols,
r#type: x::ATOM_ATOM,
long_offset: 0,
- long_length: 100000,
+ long_length: 100_000,
})) else {
return;
};
@@ -198,8 +198,7 @@ impl<'a> Connection<'a> {
let supported = protocols
.value::<u32>()
.iter()
- .find(|a| **a == event.resource_id())
- .is_some();
+ .any(|a| *a == event.resource_id());
if supported {
self.send_request(&SendEvent {
diff --git a/src/log.rs b/src/log.rs
index 5be30d3..5b1575e 100644
--- a/src/log.rs
+++ b/src/log.rs
@@ -15,10 +15,10 @@ macro_rules! debug {
#[macro_export]
macro_rules! debug_req {
($req:ident) => {
- crate::debug!("seq ?: {:?}", $req)
+ $crate::debug!("seq ?: {:?}", $req)
};
($req:ident, $cookie:ident) => {
use xcb::Cookie;
- crate::debug!("seq {}: {:?}", $cookie.sequence(), $req)
+ $crate::debug!("seq {}: {:?}", $cookie.sequence(), $req)
};
}
diff --git a/src/main.rs b/src/main.rs
index abefd93..d1c9a27 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -90,10 +90,10 @@ impl<'a> WM<'a> {
// See clients/mod.rs
Event::X(x::Event::ConfigureRequest(e)) => {
- self.handle_configure_request(&e)?
+ self.handle_configure_request(&e)?;
}
Event::X(x::Event::ConfigureNotify(e)) => {
- self.handle_configure_notify(&e)?
+ self.handle_configure_notify(&e)?;
}
Event::X(x::Event::DestroyNotify(e)) => self.handle_destroy_notify(&e),
Event::X(x::Event::MapRequest(e)) => self.handle_map_request(&e)?,
@@ -147,6 +147,6 @@ fn cleanup_process_children() {
.unwrap();
// Immediately wait for zombie processes to die - sometimes these come from startx.
- while let Ok(_) = waitpid(Pid::from_raw(-1), Some(WaitPidFlag::WNOHANG)) {}
+ while waitpid(Pid::from_raw(-1), Some(WaitPidFlag::WNOHANG)).is_ok() {}
};
}