Skip to content

Commit

Permalink
Fix clippy::needless_range_loop
Browse files Browse the repository at this point in the history
  • Loading branch information
cuviper committed Mar 5, 2021
1 parent a49c0ac commit 4b7c9d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bigint/bits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ pub(super) fn set_negative_bit(x: &mut BigInt, bit: u64, value: bool) {
digits[index_lo] ^= bit_mask_lo & bit_mask_hi;
} else {
digits[index_lo] = bit_mask_lo;
for index in (index_lo + 1)..index_hi {
digits[index] = big_digit::MAX;
for digit in &mut digits[index_lo + 1..index_hi] {
*digit = big_digit::MAX;
}
digits[index_hi] ^= bit_mask_hi;
}
Expand Down

0 comments on commit 4b7c9d7

Please sign in to comment.