mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 22:18:23 +03:00
auto merge of #5994 : huonw/rust/rational-fail-message, r=thestinger
A pedantic correction; the quotient is the result of `a/b`, not `b`.
This commit is contained in:
@@ -51,7 +51,7 @@ pub fn new_raw(numer: T, denom: T) -> Ratio<T> {
|
||||
#[inline(always)]
|
||||
pub fn new(numer: T, denom: T) -> Ratio<T> {
|
||||
if denom == Zero::zero() {
|
||||
fail!(~"quotient of 0");
|
||||
fail!(~"denominator == 0");
|
||||
}
|
||||
let mut ret = Ratio::new_raw(numer, denom);
|
||||
ret.reduce();
|
||||
|
||||
Reference in New Issue
Block a user