Skip to content

Commit

Permalink
cleanup: Use copied and all in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
khoover committed Oct 14, 2024
1 parent 469cdc4 commit 494f7fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/local/room_coordinate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,9 @@ mod test {
base[coord] += 1;
}
base.iter()
.copied()
.zip(1..51)
.for_each(|(&actual, expected)| assert_eq!(actual, expected));
.for_each(|(actual, expected)| assert_eq!(actual, expected));
}

#[test]
Expand All @@ -254,7 +255,7 @@ mod test {

for i in 0..ROOM_SIZE {
let coord = RoomCoordinate::new(i).unwrap();
assert_eq!(base[coord], [i; 50]);
assert!(base[coord].iter().copied().all(|val| val == i));
base[coord][0] += 1;
}

Expand Down

0 comments on commit 494f7fd

Please sign in to comment.