1
Fork 0

Use the now available implementation of IntoIterator for arrays

This commit is contained in:
LeSeulArtichaut 2021-06-14 23:40:09 +02:00
parent a216131c35
commit e3ca81fd5a
17 changed files with 34 additions and 34 deletions

View file

@ -1939,7 +1939,7 @@ fn add() {
(m_smallest_normalized, m_smallest_normalized, "-0x1p-125", Status::OK, Category::Normal),
];
for &(x, y, e_result, e_status, e_category) in &special_cases[..] {
for (x, y, e_result, e_status, e_category) in special_cases {
let status;
let result = unpack!(status=, x + y);
assert_eq!(status, e_status);
@ -2262,7 +2262,7 @@ fn subtract() {
(m_smallest_normalized, m_smallest_normalized, "0x0p+0", Status::OK, Category::Zero),
];
for &(x, y, e_result, e_status, e_category) in &special_cases[..] {
for (x, y, e_result, e_status, e_category) in special_cases {
let status;
let result = unpack!(status=, x - y);
assert_eq!(status, e_status);
@ -2538,7 +2538,7 @@ fn multiply() {
(m_smallest_normalized, m_smallest_normalized, "0x0p+0", underflow_status, Category::Zero),
];
for &(x, y, e_result, e_status, e_category) in &special_cases[..] {
for (x, y, e_result, e_status, e_category) in special_cases {
let status;
let result = unpack!(status=, x * y);
assert_eq!(status, e_status);
@ -2814,7 +2814,7 @@ fn divide() {
(m_smallest_normalized, m_smallest_normalized, "0x1p+0", Status::OK, Category::Normal),
];
for &(x, y, e_result, e_status, e_category) in &special_cases[..] {
for (x, y, e_result, e_status, e_category) in special_cases {
let status;
let result = unpack!(status=, x / y);
assert_eq!(status, e_status);

View file

@ -64,7 +64,7 @@ fn ppc_double_double_add_special() {
(0x7ff8000000000000, 0x3ff0000000000000, Category::NaN, Round::NearestTiesToEven),
];
for &(op1, op2, expected, round) in &data {
for (op1, op2, expected, round) in data {
{
let mut a1 = DoubleDouble::from_bits(op1);
let a2 = DoubleDouble::from_bits(op2);
@ -135,7 +135,7 @@ fn ppc_double_double_add() {
),
];
for &(op1, op2, expected, round) in &data {
for (op1, op2, expected, round) in data {
{
let mut a1 = DoubleDouble::from_bits(op1);
let a2 = DoubleDouble::from_bits(op2);
@ -172,7 +172,7 @@ fn ppc_double_double_subtract() {
),
];
for &(op1, op2, expected, round) in &data {
for (op1, op2, expected, round) in data {
let mut a1 = DoubleDouble::from_bits(op1);
let a2 = DoubleDouble::from_bits(op2);
a1 = a1.sub_r(a2, round).value;
@ -204,7 +204,7 @@ fn ppc_double_double_multiply_special() {
(0, 0x3ff0000000000000, Category::Zero, Round::NearestTiesToEven),
];
for &(op1, op2, expected, round) in &data {
for (op1, op2, expected, round) in data {
{
let mut a1 = DoubleDouble::from_bits(op1);
let a2 = DoubleDouble::from_bits(op2);
@ -290,7 +290,7 @@ fn ppc_double_double_multiply() {
),
];
for &(op1, op2, expected, round) in &data {
for (op1, op2, expected, round) in data {
{
let mut a1 = DoubleDouble::from_bits(op1);
let a2 = DoubleDouble::from_bits(op2);
@ -322,7 +322,7 @@ fn ppc_double_double_divide() {
),
];
for &(op1, op2, expected, round) in &data {
for (op1, op2, expected, round) in data {
let mut a1 = DoubleDouble::from_bits(op1);
let a2 = DoubleDouble::from_bits(op2);
a1 = a1.div_r(a2, round).value;
@ -348,7 +348,7 @@ fn ppc_double_double_remainder() {
),
];
for &(op1, op2, expected) in &data {
for (op1, op2, expected) in data {
let a1 = DoubleDouble::from_bits(op1);
let a2 = DoubleDouble::from_bits(op2);
let result = a1.ieee_rem(a2).value;
@ -376,7 +376,7 @@ fn ppc_double_double_mod() {
),
];
for &(op1, op2, expected) in &data {
for (op1, op2, expected) in data {
let a1 = DoubleDouble::from_bits(op1);
let a2 = DoubleDouble::from_bits(op2);
let r = (a1 % a2).value;
@ -426,7 +426,7 @@ fn ppc_double_double_compare() {
(0x7ff0000000000000, 0x7ff0000000000000, Some(Ordering::Equal)),
];
for &(op1, op2, expected) in &data {
for (op1, op2, expected) in data {
let a1 = DoubleDouble::from_bits(op1);
let a2 = DoubleDouble::from_bits(op2);
assert_eq!(expected, a1.partial_cmp(&a2), "compare({:#x}, {:#x})", op1, op2,);
@ -448,7 +448,7 @@ fn ppc_double_double_bitwise_eq() {
(0x7ff0000000000000, 0x7ff0000000000000, true),
];
for &(op1, op2, expected) in &data {
for (op1, op2, expected) in data {
let a1 = DoubleDouble::from_bits(op1);
let a2 = DoubleDouble::from_bits(op2);
assert_eq!(expected, a1.bitwise_eq(a2), "{:#x} = {:#x}", op1, op2);