[domistream] Tests: first compile, clippy clean

Temporaries borrowed past their statement (control, media), clippy's
is_multiple_of, needless index loop and type complexity. input.rs: the
MOUSE_MOVE_ABS builder dropped the y field; the PROTOCOL.md cross-check would
have caught it at runtime.
This commit is contained in:
2026-11-25 13:08:24 +01:00
parent 8d0bebfbc3
commit 2740d3dd45
7 changed files with 19 additions and 12 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ pub fn hex(s: &str) -> Vec<u8> {
if s == "-" {
return Vec::new();
}
assert!(s.len() % 2 == 0, "odd hex length");
assert!(s.len().is_multiple_of(2), "odd hex length");
(0..s.len()).step_by(2).map(|i| u8::from_str_radix(&s[i..i + 2], 16).expect("hex digit")).collect()
}