some clippy improvements
This commit is contained in:
parent
8c23a9c924
commit
359e5124bd
@ -541,9 +541,9 @@ pub mod tests {
|
|||||||
u8.write_to_be_bytes(&mut buf)
|
u8.write_to_be_bytes(&mut buf)
|
||||||
.expect("writing to raw buffer failed");
|
.expect("writing to raw buffer failed");
|
||||||
assert_eq!(buf[0], 5);
|
assert_eq!(buf[0], 5);
|
||||||
for i in 1..8 {
|
(1..8).for_each(|i| {
|
||||||
assert_eq!(buf[i], 0);
|
assert_eq!(buf[i], 0);
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -569,9 +569,9 @@ pub mod tests {
|
|||||||
.expect("writing to raw buffer failed");
|
.expect("writing to raw buffer failed");
|
||||||
let raw_val = u32::from_be_bytes(buf[0..4].try_into().unwrap());
|
let raw_val = u32::from_be_bytes(buf[0..4].try_into().unwrap());
|
||||||
assert_eq!(raw_val, 80932);
|
assert_eq!(raw_val, 80932);
|
||||||
for i in 4..8 {
|
(4..8).for_each(|i| {
|
||||||
assert_eq!(buf[i], 0);
|
assert_eq!(buf[i], 0);
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user