Skip to content

Commit

Permalink
limb: Unmerge usize_from_u32 import from "alloc"-guarded use
Browse files Browse the repository at this point in the history
Since commit e88750b ("Define native word size as
`constant_time::Word`.") `usize_from_u32()` is unconditionally used
in and via global `const`s but was (likely accidentally by means
of `rust-analyzer`) merged into a `use` statement that's guarded by
`feature = "alloc"`.  When compiling this crate without that feature,
which happens with `default-features = false`, this fails to compile due
to missing the import.

Moving the import to the unguarded `use crate::` group solves this.
  • Loading branch information
MarijnS95 authored and briansmith committed Jan 12, 2025
1 parent 8d7a6f8 commit 7476129
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/limb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
use crate::{
c, constant_time, error,
polyfill::{slice, ArrayFlatMap},
polyfill::{slice, usize_from_u32, ArrayFlatMap},
};

#[cfg(any(test, feature = "alloc"))]
use crate::{bits, polyfill::usize_from_u32};
use crate::bits;

#[cfg(feature = "alloc")]
use core::num::Wrapping;
Expand Down

0 comments on commit 7476129

Please sign in to comment.