clippy: clean up all warnings

Mostly `cargo clippy --fix`: needless borrows, redundant field names,
match -> if let, io::Error::other, Option::filter/map, let chains, c""
literals. By hand: drop unused impl lifetimes, a type alias for the
font preload map, Iterator::find in next_buffer, contains_key, and
allow new_ret_no_self where constructors intentionally return the
boxed/generic wrapper type.

No functional change; tests and release build unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Bendik Aagaard Lynghaug
2026-10-03 09:20:25 +00:00
co-authored by Claude Fable 5.1
parent 42ffe9c492
commit 1c6a536026
20 changed files with 153 additions and 190 deletions
+13 -16
View File
@@ -159,7 +159,7 @@ fn main() {
handle
.insert_source(
WaylandSource::new(event_queue).expect("Could not create WaylandSource!"),
|_event, queue, mut state| queue.dispatch_pending(&mut state),
|_event, queue, state| queue.dispatch_pending(state),
)
.expect("Failed to insert event source!");
@@ -239,23 +239,20 @@ fn main() {
.spawn(move || {
let listener = UnixListener::bind(socket_path.clone()).unwrap();
loop {
match listener.accept() {
Ok((stream, _)) => {
let _ = thread::Builder::new().name("ipc_client".to_string()).spawn(
move || {
let r = BufReader::new(stream);
for line in r.lines() {
match line {
Ok(ref cmd) if cmd == "kill" => {
std::process::exit(0);
}
_ => {}
if let Ok((stream, _)) = listener.accept() {
let _ = thread::Builder::new().name("ipc_client".to_string()).spawn(
move || {
let r = BufReader::new(stream);
for line in r.lines() {
match line {
Ok(ref cmd) if cmd == "kill" => {
std::process::exit(0);
}
_ => {}
}
},
);
}
_ => (),
}
},
);
}
}
});