Skip to content

Commit cee3b84

Browse files
warren2kmightyiam
andcommitted
build: power_scalar_base behind no_alloc feature
Co-authored-by: Shahar "Dawn" Or <[email protected]>
1 parent ee0a550 commit cee3b84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/size_hint.rs

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
use std::usize;
55
use std::cmp;
6+
#[cfg(feature = "use_alloc")]
67
use std::u32;
78

89
/// `SizeHint` is the return type of `Iterator::size_hint()`.
@@ -76,6 +77,7 @@ pub fn mul_scalar(sh: SizeHint, x: usize) -> SizeHint {
7677
}
7778

7879
/// Raise `base` correctly by a `SizeHint` exponent.
80+
#[cfg(feature = "use_alloc")]
7981
#[inline]
8082
pub fn pow_scalar_base(base: usize, exp: SizeHint) -> SizeHint {
8183
let exp_low = cmp::min(exp.0, u32::MAX as usize) as u32;

0 commit comments

Comments
 (0)