message: Saturate the conversions in BitUint::set_bit
diff: @@ -2743,12 +2743,16 @@ impl BigUint {
  /// Note that setting a bit greater than the current bit length, a reallocation may be needed
  /// to store the new digits
  pub fn set_bit(&mut self, bit: u64, value: bool) {
  + // Note: we're saturating `digit_index` and `new_len` -- any such case is guaranteed to
  + // fail allocation, and that's more consistent than adding our own overflow panics.
  let bits_per_digit = u64::from(big_digit::BITS);
  - let digit_index = (bit / bits_per_digit).to_usize().unwrap();
  + let digit_index = (bit / bits_per_digit)
  + .to_usize()
  + .unwrap_or(core::usize::MAX);
  let bit_mask = (1 as BigDigit) << (bit % bits_per_digit);
  if value {
  if digit_index >= self.data.len() {
  - let new_len = digit_index.checked_add(1).unwrap();
  + let new_len = digit_index.saturating_add(1);
  self.data.resize(new_len, 0);
  }
  self.data[digit_index] |= bit_mask;
  