[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
+2 -1
View File
@@ -225,7 +225,8 @@ fn msg(ty: u16, body: &[u8]) -> Vec<u8> {
#[test]
fn message_split() {
let r = parse_message(&msg(0x010b, &[1, 2, 3])).unwrap();
let m = msg(0x010b, &[1, 2, 3]);
let r = parse_message(&m).unwrap();
assert_eq!(r.message_type, 0x010b);
assert_eq!(r.body, &[1, 2, 3]);
assert_eq!(parse_message(&msg(0x7777, &[])).unwrap().body, &[] as &[u8]);