diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-21 13:08:31 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-10-22 08:09:56 -0700 |
| commit | daf5f5a4d10513ff42e79fa7ef8819b170f3a13d (patch) | |
| tree | 7a07a79c43e02debcc6bbb33d90a5e41b70119e6 /src/libextra/num | |
| parent | 15a6bdebab4e7b811b9a902e3f8ed225c59af06e (diff) | |
Drop the '2' suffix from logging macros
Who doesn't like a massive renaming?
Diffstat (limited to 'src/libextra/num')
| -rw-r--r-- | src/libextra/num/bigint.rs | 18 | ||||
| -rw-r--r-- | src/libextra/num/rational.rs | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/libextra/num/bigint.rs b/src/libextra/num/bigint.rs index ed68f3162aa..cd5ccc14caf 100644 --- a/src/libextra/num/bigint.rs +++ b/src/libextra/num/bigint.rs @@ -353,7 +353,7 @@ impl Rem<BigUint, BigUint> for BigUint { impl Neg<BigUint> for BigUint { #[inline] - fn neg(&self) -> BigUint { fail2!() } + fn neg(&self) -> BigUint { fail!() } } impl Integer for BigUint { @@ -375,7 +375,7 @@ impl Integer for BigUint { } fn div_mod_floor(&self, other: &BigUint) -> (BigUint, BigUint) { - if other.is_zero() { fail2!() } + if other.is_zero() { fail!() } if self.is_zero() { return (Zero::zero(), Zero::zero()); } if *other == One::one() { return ((*self).clone(), Zero::zero()); } @@ -824,7 +824,7 @@ fn get_radix_base(radix: uint) -> (uint, uint) { 14 => (38416, 4), 15 => (50625, 4), 16 => (65536, 4), - _ => fail2!() + _ => fail!() } } @@ -848,7 +848,7 @@ fn get_radix_base(radix: uint) -> (uint, uint) { 14 => (1475789056, 8), 15 => (2562890625, 8), 16 => (4294967296, 8), - _ => fail2!() + _ => fail!() } } @@ -1102,7 +1102,7 @@ impl Integer for BigInt { let d = BigInt::from_biguint(Plus, d_ui); let r = BigInt::from_biguint(Plus, r_ui); match (self.sign, other.sign) { - (_, Zero) => fail2!(), + (_, Zero) => fail!(), (Plus, Plus) | (Zero, Plus) => ( d, r), (Plus, Minus) | (Zero, Minus) => (-d, r), (Minus, Plus) => (-d, -r), @@ -1128,7 +1128,7 @@ impl Integer for BigInt { let d = BigInt::from_biguint(Plus, d_ui); let m = BigInt::from_biguint(Plus, m_ui); match (self.sign, other.sign) { - (_, Zero) => fail2!(), + (_, Zero) => fail!(), (Plus, Plus) | (Zero, Plus) => (d, m), (Plus, Minus) | (Zero, Minus) => if m.is_zero() { (-d, Zero::zero()) @@ -1942,7 +1942,7 @@ mod biguint_tests { ~"2" + str::from_chars(vec::from_elem(bits / 2 - 1, '0')) + "1"), (10, match bits { - 32 => ~"8589934593", 16 => ~"131073", _ => fail2!() + 32 => ~"8589934593", 16 => ~"131073", _ => fail!() }), (16, ~"2" + @@ -1959,7 +1959,7 @@ mod biguint_tests { (10, match bits { 32 => ~"55340232229718589441", 16 => ~"12885032961", - _ => fail2!() + _ => fail!() }), (16, ~"3" + str::from_chars(vec::from_elem(bits / 4 - 1, '0')) + "2" + @@ -2014,7 +2014,7 @@ mod biguint_tests { fn check(n: uint, s: &str) { let n = factor(n); let ans = match FromStrRadix::from_str_radix(s, 10) { - Some(x) => x, None => fail2!() + Some(x) => x, None => fail!() }; assert_eq!(n, ans); } diff --git a/src/libextra/num/rational.rs b/src/libextra/num/rational.rs index a8dfdfbfd00..abb802c06f3 100644 --- a/src/libextra/num/rational.rs +++ b/src/libextra/num/rational.rs @@ -50,7 +50,7 @@ impl<T: Clone + Integer + Ord> #[inline] pub fn new(numer: T, denom: T) -> Ratio<T> { if denom == Zero::zero() { - fail2!("denominator == 0"); + fail!("denominator == 0"); } let mut ret = Ratio::new_raw(numer, denom); ret.reduce(); |
