Skip to content

Commit

Permalink
num: Fix the documentation of abs_sub.
Browse files Browse the repository at this point in the history
Use proper argument names and unbackquote the word "zero" because it is
not an identifier.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
  • Loading branch information
omasanori committed Aug 4, 2014
1 parent 845ff65 commit 3e6edee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/num/mod.rs
Expand Up @@ -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)
Expand Down

5 comments on commit 3e6edee

@bors
Copy link
Contributor

@bors bors commented on 3e6edee Aug 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 3e6edee Aug 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging omasanori/rust/abs_sub = 3e6edee into auto

@bors
Copy link
Contributor

@bors bors commented on 3e6edee Aug 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omasanori/rust/abs_sub = 3e6edee merged ok, testing candidate = 765a23f

@bors
Copy link
Contributor

@bors bors commented on 3e6edee Aug 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 765a23f

Please sign in to comment.