Browse Source

std::from_str::FromStr -> std::str::FromStr

gifnksm 10 years ago
parent
commit
29011d14d9
3 changed files with 5 additions and 7 deletions
  1. 1 1
      benches/shootout-pidigits.rs
  2. 2 4
      src/bigint.rs
  3. 2 2
      src/rational.rs

+ 1 - 1
benches/shootout-pidigits.rs

@@ -41,7 +41,7 @@
 extern crate num;
 extern crate test;
 
-use std::from_str::FromStr;
+use std::str::FromStr;
 use std::num::FromPrimitive;
 
 use test::Bencher;

+ 2 - 4
src/bigint.rs

@@ -60,12 +60,10 @@ use rand::Rng;
 
 use std::{cmp, fmt, hash};
 use std::default::Default;
-use std::from_str::FromStr;
 use std::iter::{AdditiveIterator, MultiplicativeIterator};
 use std::num::{Int, ToPrimitive, FromPrimitive};
 use std::num::FromStrRadix;
-use std::str;
-use std::string::String;
+use std::str::{mod, FromStr};
 use std::{i64, u64};
 
 use {Num, Unsigned, CheckedAdd, CheckedSub, CheckedMul, CheckedDiv, Signed, Zero, One};
@@ -1476,7 +1474,7 @@ mod biguint_tests {
     use super::{Plus, BigInt, RandBigInt, ToBigInt};
 
     use std::cmp::{Less, Equal, Greater};
-    use std::from_str::FromStr;
+    use std::str::FromStr;
     use std::i64;
     use std::num::FromStrRadix;
     use std::num::{ToPrimitive, FromPrimitive};

+ 2 - 2
src/rational.rs

@@ -14,7 +14,7 @@ use Integer;
 
 use std::cmp;
 use std::fmt;
-use std::from_str::FromStr;
+use std::str::FromStr;
 use std::num::{FromStrRadix, Float};
 use std::iter::{AdditiveIterator, MultiplicativeIterator};
 
@@ -403,7 +403,7 @@ mod test {
 
     use super::{Ratio, Rational, BigRational};
     use std::num::{FromPrimitive, Float};
-    use std::from_str::FromStr;
+    use std::str::FromStr;
     use std::hash::hash;
     use std::i32;
     use {Zero, One, Signed};