Remove use of deprecated function
This commit is contained in:
parent
68bd495f0b
commit
8b156724a3
1 changed files with 3 additions and 2 deletions
|
@ -751,8 +751,9 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_pow() {
|
fn test_pow() {
|
||||||
fn naive_pow<T: One + Mul<T, T>>(base: T, exp: uint) -> T {
|
fn naive_pow<T: Int>(base: T, exp: uint) -> T {
|
||||||
range(0, exp).fold(one::<T>(), |acc, _| acc * base)
|
let one: T = Int::one();
|
||||||
|
range(0, exp).fold(one, |acc, _| acc * base)
|
||||||
}
|
}
|
||||||
macro_rules! assert_pow(
|
macro_rules! assert_pow(
|
||||||
(($num:expr, $exp:expr) => $expected:expr) => {{
|
(($num:expr, $exp:expr) => $expected:expr) => {{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue