Skip to content

Commit

Permalink
Remove ambiguous array into_iter usage in tests.
Browse files Browse the repository at this point in the history
See rust-lang/rust#66145. The removed checks aren't particularly useful and
might turn into build errors in the next rust edition.
  • Loading branch information
nical committed May 28, 2021
1 parent e35f9dc commit b0d1476
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/angle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,5 +348,4 @@ fn sum() {
let angles = [A::radians(1.0), A::radians(2.0), A::radians(3.0)];
let sum = A::radians(6.0);
assert_eq!(angles.iter().sum::<A>(), sum);
assert_eq!(angles.into_iter().sum::<A>(), sum);
}
1 change: 0 additions & 1 deletion src/length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ mod tests {
let lengths = [L::new(1.0), L::new(2.0), L::new(3.0)];

assert_eq!(lengths.iter().sum::<L>(), L::new(6.0));
assert_eq!(lengths.into_iter().sum::<L>(), L::new(6.0));
}

#[test]
Expand Down
2 changes: 0 additions & 2 deletions src/size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,6 @@ mod size2d {
];
let sum = Size2D::new(3.0, 6.0);
assert_eq!(sizes.iter().sum::<Size2D<_>>(), sum);
assert_eq!(sizes.into_iter().sum::<Size2D<_>>(), sum);
}

#[test]
Expand Down Expand Up @@ -1695,7 +1694,6 @@ mod size3d {
];
let sum = Size3D::new(3.0, 6.0, 9.0);
assert_eq!(sizes.iter().sum::<Size3D<_>>(), sum);
assert_eq!(sizes.into_iter().sum::<Size3D<_>>(), sum);
}

#[test]
Expand Down
2 changes: 0 additions & 2 deletions src/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2207,7 +2207,6 @@ mod vector2d {
];
let sum = Vector2DMm::new(9.0, 12.0);
assert_eq!(vecs.iter().sum::<Vector2DMm<_>>(), sum);
assert_eq!(vecs.into_iter().sum::<Vector2DMm<_>>(), sum);
}

#[test]
Expand Down Expand Up @@ -2273,7 +2272,6 @@ mod vector3d {
];
let sum = Vec3::new(12.0, 15.0, 18.0);
assert_eq!(vecs.iter().sum::<Vec3>(), sum);
assert_eq!(vecs.into_iter().sum::<Vec3>(), sum);
}

#[test]
Expand Down

0 comments on commit b0d1476

Please sign in to comment.