fix(vec1): Have test compare every element in a and v

The previous test would stop comparing elements in array a and vec v upon reaching the last element of either. This resulted in the test passing even if v did not contain all the elements in a. This change to the test fixes that bug and should only pass if all the elements in a and v are present and equal.
This commit is contained in:
Jacob Tinkhauser 2020-11-29 01:35:14 +00:00 committed by GitHub
parent 5aa467bef2
commit 9b6c629397
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -20,6 +20,6 @@ mod tests {
#[test] #[test]
fn test_array_and_vec_similarity() { fn test_array_and_vec_similarity() {
let (a, v) = array_and_vec(); let (a, v) = array_and_vec();
assert!(a.iter().zip(v.iter()).all(|(x, y)| x == y)); assert_eq!(a, v[..]);
} }
} }