apply clippy in tests

This commit is contained in:
MaxOhn
2024-02-25 00:41:02 +01:00
parent c71f81d8aa
commit 82ba8da8b0
4 changed files with 22 additions and 22 deletions
+6 -6
View File
@@ -46,16 +46,16 @@ mod tests {
(3.0, 3.0),
(3.5, 4.0),
(4.5, 4.0),
(4.500001, 5.0),
(3.499999, 3.0),
(3.500001, 4.0),
(4.500_001, 5.0),
(3.499_999, 3.0),
(3.500_001, 4.0),
(100_000_000_002.5, 100_000_000_002.0),
(-3.0, -3.0),
(-3.5, -4.0),
(-4.5, -4.0),
(-4.500001, -5.0),
(-3.499999, -3.0),
(-3.500001, -4.0),
(-4.500_001, -5.0),
(-3.499_999, -3.0),
(-3.500_001, -4.0),
(-100_000_000_002.5, -100_000_000_002.0),
];
+4 -4
View File
@@ -245,12 +245,12 @@ mod test {
let (head, tail) = queue.as_slices();
for i in 0..head.len() {
assert_eq!(queue.iter().nth(i), Some(&head[i]));
for (i, item) in head.iter().enumerate() {
assert_eq!(queue.iter().nth(i), Some(item));
}
for i in 0..tail.len() {
assert_eq!(queue.iter().nth(head.len() + i), Some(&tail[i]));
for (i, item) in tail.iter().enumerate() {
assert_eq!(queue.iter().nth(head.len() + i), Some(item));
}
assert_eq!(queue.iter().nth(head.len() + tail.len() + 1), None);