]> git.lizzy.rs Git - rust.git/commitdiff
Use `()` when referring to functions
authorCarol (Nichols || Goulding) <carol.nichols@gmail.com>
Mon, 23 May 2016 17:06:23 +0000 (13:06 -0400)
committerCarol (Nichols || Goulding) <carol.nichols@gmail.com>
Mon, 23 May 2016 17:06:23 +0000 (13:06 -0400)
src/libcore/cmp.rs

index be56ab1a41b81bf31a9ec81ab42c07735a27787b..f23128b336466d97102ea44456a7eb5a1b1ad2f6 100644 (file)
@@ -255,8 +255,8 @@ pub fn reverse(self) -> Ordering {
 ///
 /// `Ord` requires that the type also be `PartialOrd` and `Eq` (which requires `PartialEq`).
 ///
-/// Then you must define an implementation for `cmp`. You may find it useful to use
-/// `cmp` on your type's fields.
+/// Then you must define an implementation for `cmp()`. You may find it useful to use
+/// `cmp()` on your type's fields.
 ///
 /// Here's an example where you want to sort people by height only, disregarding `id`
 /// and `name`:
@@ -355,7 +355,7 @@ fn partial_cmp(&self, other: &Ordering) -> Option<Ordering> {
 ///
 /// `PartialOrd` requires your type to be `PartialEq`.
 ///
-/// If your type is `Ord`, you can implement `partial_cmp` by using `cmp`:
+/// If your type is `Ord`, you can implement `partial_cmp()` by using `cmp()`:
 ///
 /// ```
 /// impl PartialOrd for Person {
@@ -365,7 +365,7 @@ fn partial_cmp(&self, other: &Ordering) -> Option<Ordering> {
 /// }
 /// ```
 ///
-/// You may also find it useful to use `partial_cmp` on your type`s fields. Here
+/// You may also find it useful to use `partial_cmp()` on your type`s fields. Here
 /// is an example of `Person` types who have a floating-point `height` field that
 /// is the only field to be used for sorting:
 ///