about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorOGINO Masanori <masanori.ogino@gmail.com>2014-08-04 14:00:45 +0900
committerOGINO Masanori <masanori.ogino@gmail.com>2014-08-04 14:04:28 +0900
commit3e6edee002ea3edd3e367161fabe25b075e5e3be (patch)
tree492bcc67f8e9c3e1d71774896074bbccc469b5bd /src
parent845ff6567fc9e5cb35a61aa77de79343cdb125d7 (diff)
downloadrust-3e6edee002ea3edd3e367161fabe25b075e5e3be.tar.gz
rust-3e6edee002ea3edd3e367161fabe25b075e5e3be.zip
num: Fix the documentation of abs_sub.
Use proper argument names and unbackquote the word "zero" because it is
not an identifier.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcore/num/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index 53491cf2142..2b7249aca12 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -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)