We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee0a550 commit cee3b84Copy full SHA for cee3b84
src/size_hint.rs
@@ -3,6 +3,7 @@
3
4
use std::usize;
5
use std::cmp;
6
+#[cfg(feature = "use_alloc")]
7
use std::u32;
8
9
/// `SizeHint` is the return type of `Iterator::size_hint()`.
@@ -76,6 +77,7 @@ pub fn mul_scalar(sh: SizeHint, x: usize) -> SizeHint {
76
77
}
78
79
/// Raise `base` correctly by a `SizeHint` exponent.
80
81
#[inline]
82
pub fn pow_scalar_base(base: usize, exp: SizeHint) -> SizeHint {
83
let exp_low = cmp::min(exp.0, u32::MAX as usize) as u32;
0 commit comments