Merge pull request #66 from freebroccolo/master

Update dependencies; fix build; silence warnings
This commit is contained in:
Alex Crichton 2015-03-17 23:57:54 -07:00
commit ab79063c22
5 changed files with 16 additions and 13 deletions

View File

@ -14,5 +14,5 @@ rational, and complex types.
"""
[dependencies]
rustc-serialize = "0.2"
rand = "0.1"
rustc-serialize = "0.3.5"
rand = "0.2.0"

View File

@ -38,6 +38,9 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.
#![feature(core)]
#![feature(test)]
extern crate num;
extern crate test;
@ -124,9 +127,9 @@ fn use_bencher(b: &mut Bencher) {
b.iter(|| pidigits(DEFAULT_DIGITS))
}
#[allow(dead_code)]
fn main() {
let args = std::os::args();
let args = args.as_slice();
let args = std::env::args().collect::<Vec<_>>();
let n = if args.len() < 2 {
DEFAULT_DIGITS
} else {

View File

@ -2300,7 +2300,7 @@ mod biguint_tests {
}
#[test]
#[should_fail]
#[should_panic]
fn test_sub_fail_on_underflow() {
let (a, b) : (BigUint, BigUint) = (Zero::zero(), One::one());
a - b;
@ -2686,14 +2686,14 @@ mod biguint_tests {
}
#[test]
#[should_fail]
#[should_panic]
fn test_zero_rand_range() {
thread_rng().gen_biguint_range(&FromPrimitive::from_usize(54).unwrap(),
&FromPrimitive::from_usize(54).unwrap());
}
#[test]
#[should_fail]
#[should_panic]
fn test_negative_rand_range() {
let mut rng = thread_rng();
let l = FromPrimitive::from_usize(2352).unwrap();
@ -3351,14 +3351,14 @@ mod bigint_tests {
}
#[test]
#[should_fail]
#[should_panic]
fn test_zero_rand_range() {
thread_rng().gen_bigint_range(&FromPrimitive::from_isize(54).unwrap(),
&FromPrimitive::from_isize(54).unwrap());
}
#[test]
#[should_fail]
#[should_panic]
fn test_negative_rand_range() {
let mut rng = thread_rng();
let l = FromPrimitive::from_usize(2352).unwrap();

View File

@ -324,7 +324,7 @@ mod test {
}
#[test]
#[should_fail]
#[should_panic]
fn test_divide_by_zero_natural() {
let n = Complex::new(2, 3);
let d = Complex::new(0, 0);
@ -332,7 +332,7 @@ mod test {
}
#[test]
#[should_fail]
#[should_panic]
#[ignore]
fn test_inv_zero() {
// FIXME #5736: should this really fail, or just NaN?

View File

@ -519,7 +519,7 @@ mod test {
assert_eq!(one22, One::one());
}
#[test]
#[should_fail]
#[should_panic]
fn test_new_zero() {
let _a = Ratio::new(1,0);
}
@ -674,7 +674,7 @@ mod test {
assert_eq!(_0 - _0, _0);
}
#[test]
#[should_fail]
#[should_panic]
fn test_div_0() {
let _a = _1 / _0;
}