|
@@ -18,7 +18,6 @@
|
|
|
//! approximate a square root to arbitrary precision:
|
|
|
//!
|
|
|
//! ```
|
|
|
-//! # #![feature(core)]
|
|
|
//! extern crate num;
|
|
|
//!
|
|
|
//! use num::FromPrimitive;
|
|
@@ -44,7 +43,7 @@
|
|
|
//!
|
|
|
//! [newt]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
|
|
|
//#![cfg_attr(test, deny(warnings))]
|
|
|
-#![cfg_attr(test, feature(hash, test))]
|
|
|
+#![cfg_attr(test, feature(test))]
|
|
|
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
|
|
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
|
|
|
html_root_url = "http://doc.rust-lang.org/num/",
|
|
@@ -145,5 +144,8 @@ pub fn pow<T: Clone + One + Mul<T, Output = T>>(mut base: T, mut exp: usize) ->
|
|
|
|
|
|
#[cfg(test)]
|
|
|
fn hash<T: hash::Hash>(x: &T) -> u64 {
|
|
|
- hash::hash::<T, hash::SipHasher>(x)
|
|
|
+ use std::hash::Hasher;
|
|
|
+ let mut hasher = hash::SipHasher::new();
|
|
|
+ x.hash(&mut hasher);
|
|
|
+ hasher.finish()
|
|
|
}
|