diff options
| author | Josh Stone <jistone@redhat.com> | 2021-03-08 15:32:41 -0800 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2021-03-26 09:32:31 -0700 |
| commit | 72ebebe474aae7203a27fdc1296617edd01321f1 (patch) | |
| tree | e3c47cd4378cc6370ad588318970b2118099fd2a /compiler/rustc_apfloat/src/ieee.rs | |
| parent | 3b1f5e34620d6bfa32a127258e2c2d9f2f4d693b (diff) | |
| download | rust-72ebebe474aae7203a27fdc1296617edd01321f1.tar.gz rust-72ebebe474aae7203a27fdc1296617edd01321f1.zip | |
Use iter::zip in compiler/
Diffstat (limited to 'compiler/rustc_apfloat/src/ieee.rs')
| -rw-r--r-- | compiler/rustc_apfloat/src/ieee.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_apfloat/src/ieee.rs b/compiler/rustc_apfloat/src/ieee.rs index 71bcb8f090d..96277950cfe 100644 --- a/compiler/rustc_apfloat/src/ieee.rs +++ b/compiler/rustc_apfloat/src/ieee.rs @@ -2273,6 +2273,7 @@ impl Loss { mod sig { use super::{limbs_for_bits, ExpInt, Limb, Loss, LIMB_BITS}; use core::cmp::Ordering; + use core::iter; use core::mem; pub(super) fn is_all_zeros(limbs: &[Limb]) -> bool { @@ -2483,7 +2484,7 @@ mod sig { pub(super) fn add(a: &mut [Limb], b: &[Limb], mut c: Limb) -> Limb { assert!(c <= 1); - for (a, &b) in a.iter_mut().zip(b) { + for (a, &b) in iter::zip(a, b) { let (r, overflow) = a.overflowing_add(b); let (r, overflow2) = r.overflowing_add(c); *a = r; @@ -2497,7 +2498,7 @@ mod sig { pub(super) fn sub(a: &mut [Limb], b: &[Limb], mut c: Limb) -> Limb { assert!(c <= 1); - for (a, &b) in a.iter_mut().zip(b) { + for (a, &b) in iter::zip(a, b) { let (r, overflow) = a.overflowing_sub(b); let (r, overflow2) = r.overflowing_sub(c); *a = r; |
