Skip to content

Commit be0216b

Browse files
committed
Use Nonzero*::get() instead of NonZero*.into() in some places.
1 parent 7b06be8 commit be0216b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/arithmetic/inout.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub(crate) trait AliasingSlices2<T> {
4141
where
4242
Self: Sized,
4343
{
44-
self.with_potentially_dangling_non_null_pointers_ra(expected_len.into(), f)
44+
self.with_potentially_dangling_non_null_pointers_ra(expected_len.get(), f)
4545
}
4646

4747
/// If `expected_len == 0` then the pointers passed to `f` may be
@@ -116,7 +116,7 @@ pub(crate) trait AliasingSlices3<T> {
116116
where
117117
Self: Sized,
118118
{
119-
self.with_potentially_dangling_non_null_pointers_rab(expected_len.into(), f)
119+
self.with_potentially_dangling_non_null_pointers_rab(expected_len.get(), f)
120120
}
121121

122122
/// If `expected_len == 0` then the pointers passed to `f` may be

src/limb.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn limbs_less_than_limbs(a: &[Limb], b: &[Limb]) -> Result<LimbMask, LenMismatch
6060
// optimizer.
6161
// XXX: Questionable whether `LenMismatchError` is appropriate.
6262
let len = NonZeroUsize::new(b.len()).ok_or_else(|| LenMismatchError::new(a.len()))?;
63-
if a.len() != len.into() {
63+
if a.len() != len.get() {
6464
return Err(LenMismatchError::new(a.len()));
6565
}
6666
Ok(unsafe { LIMBS_less_than(a.as_ptr(), b.as_ptr(), len) })

0 commit comments

Comments
 (0)