We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f549f30 commit 84b6ae8Copy full SHA for 84b6ae8
src/lib.rs
@@ -1961,15 +1961,15 @@ mod test {
1961
1962
#[test]
1963
fn test_sum() {
1964
- let v = vec![_0_1i, _4_2i, _1_0i, _1_1i];
1965
- let _: Complex64 = v.iter().sum();
1966
- let _: Complex64 = v.into_iter().sum();
+ let v = vec![_0_1i, _1_0i];
+ assert_eq!(v.iter().sum::<Complex64>(), _1_1i);
+ assert_eq!(v.into_iter().sum::<Complex64>(), _1_1i);
1967
}
1968
1969
1970
fn test_prod() {
1971
1972
- let _: Complex64 = v.iter().product();
1973
- let _: Complex64 = v.into_iter().product();
+ assert_eq!(v.iter().product::<Complex64>(), _0_1i);
+ assert_eq!(v.into_iter().product::<Complex64>(), _0_1i);
1974
1975
0 commit comments