[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:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user