diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2013-05-09 13:52:07 +0200 |
|---|---|---|
| committer | Björn Steinbrink <bsteinbr@gmail.com> | 2013-05-14 16:36:24 +0200 |
| commit | 04de8f852c4def51f02eb812f4ecee83d416911b (patch) | |
| tree | bf394aa7ebda0ae70ae70d03f753d6de4388e939 /src/libcore/num | |
| parent | bdc182cc41c2741edc6fdc4ec09b8522479aab40 (diff) | |
| download | rust-04de8f852c4def51f02eb812f4ecee83d416911b.tar.gz rust-04de8f852c4def51f02eb812f4ecee83d416911b.zip | |
Fix cosmetics for fail!() calls
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/strconv.rs | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/libcore/num/strconv.rs b/src/libcore/num/strconv.rs index 044b0d4a36c..1d65b84b7ce 100644 --- a/src/libcore/num/strconv.rs +++ b/src/libcore/num/strconv.rs @@ -178,11 +178,9 @@ pub fn to_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Copy+ num: &T, radix: uint, negative_zero: bool, sign: SignFormat, digits: SignificantDigits) -> (~[u8], bool) { if (radix as int) < 2 { - fail!("to_str_bytes_common: radix %? to low, \ - must lie in the range [2, 36]", radix); + fail!("to_str_bytes_common: radix %? to low, must lie in the range [2, 36]", radix); } else if radix as int > 36 { - fail!("to_str_bytes_common: radix %? to high, \ - must lie in the range [2, 36]", radix); + fail!("to_str_bytes_common: radix %? to high, must lie in the range [2, 36]", radix); } let _0: T = Zero::zero(); @@ -445,19 +443,19 @@ pub fn from_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+Copy+Div<T,T>+ match exponent { ExpDec if radix >= DIGIT_E_RADIX // decimal exponent 'e' => fail!("from_str_bytes_common: radix %? incompatible with \ - use of 'e' as decimal exponent", radix), + use of 'e' as decimal exponent", radix), ExpBin if radix >= DIGIT_P_RADIX // binary exponent 'p' => fail!("from_str_bytes_common: radix %? incompatible with \ - use of 'p' as binary exponent", radix), + use of 'p' as binary exponent", radix), _ if special && radix >= DIGIT_I_RADIX // first digit of 'inf' => fail!("from_str_bytes_common: radix %? incompatible with \ - special values 'inf' and 'NaN'", radix), + special values 'inf' and 'NaN'", radix), _ if (radix as int) < 2 => fail!("from_str_bytes_common: radix %? to low, \ - must lie in the range [2, 36]", radix), + must lie in the range [2, 36]", radix), _ if (radix as int) > 36 => fail!("from_str_bytes_common: radix %? to high, \ - must lie in the range [2, 36]", radix), + must lie in the range [2, 36]", radix), _ => () } |
