1
Fork 0

auto merge of #16233 : omasanori/rust/abs_sub, r=steveklabnik

Use proper argument names and unbackquote the word "zero" because it is not an identifier.
This commit is contained in:
bors 2014-08-04 05:16:35 +00:00
commit 765a23f73d

View file

@ -279,8 +279,8 @@ pub fn abs<T: Signed>(value: T) -> T {
/// The positive difference of two numbers.
///
/// Returns `zero` if the number is less than or equal to `other`,
/// otherwise the difference between `self` and `other` is returned.
/// Returns zero if `x` is less than or equal to `y`, otherwise the difference
/// between `x` and `y` is returned.
#[inline(always)]
pub fn abs_sub<T: Signed>(x: T, y: T) -> T {
x.abs_sub(&y)