Skip to content

Commit 4671345

Browse files
Remove size_hint::pow_scalar_base
1 parent 75ead8e commit 4671345

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/size_hint.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
44
use std::usize;
55
use std::cmp;
6-
use std::u32;
76

87
/// `SizeHint` is the return type of `Iterator::size_hint()`.
98
pub type SizeHint = (usize, Option<usize>);
@@ -75,21 +74,6 @@ pub fn mul_scalar(sh: SizeHint, x: usize) -> SizeHint {
7574
(low, hi)
7675
}
7776

78-
/// Raise `base` correctly by a `SizeHint` exponent.
79-
#[inline]
80-
#[allow(dead_code)]
81-
pub fn pow_scalar_base(base: usize, exp: SizeHint) -> SizeHint {
82-
let exp_low = cmp::min(exp.0, u32::MAX as usize) as u32;
83-
let low = base.saturating_pow(exp_low);
84-
85-
let hi = exp.1.and_then(|exp| {
86-
let exp_hi = cmp::min(exp, u32::MAX as usize) as u32;
87-
base.checked_pow(exp_hi)
88-
});
89-
90-
(low, hi)
91-
}
92-
9377
/// Return the maximum
9478
#[inline]
9579
pub fn max(a: SizeHint, b: SizeHint) -> SizeHint {

0 commit comments

Comments
 (0)