@@ -78,7 +78,7 @@ use option::Option::{self, Some};
78
78
/// }
79
79
///
80
80
/// impl PartialEq for Book {
81
- /// fn eq(&self, other: &Self ) -> bool {
81
+ /// fn eq(&self, other: &Book ) -> bool {
82
82
/// self.isbn == other.isbn
83
83
/// }
84
84
/// }
@@ -147,7 +147,7 @@ pub trait PartialEq<Rhs: ?Sized = Self> {
147
147
/// format: BookFormat,
148
148
/// }
149
149
/// impl PartialEq for Book {
150
- /// fn eq(&self, other: &Self ) -> bool {
150
+ /// fn eq(&self, other: &Book ) -> bool {
151
151
/// self.isbn == other.isbn
152
152
/// }
153
153
/// }
@@ -272,19 +272,19 @@ impl Ordering {
272
272
/// }
273
273
///
274
274
/// impl Ord for Person {
275
- /// fn cmp(&self, other: &Self ) -> Ordering {
275
+ /// fn cmp(&self, other: &Person ) -> Ordering {
276
276
/// self.height.cmp(&other.height)
277
277
/// }
278
278
/// }
279
279
///
280
280
/// impl PartialOrd for Person {
281
- /// fn partial_cmp(&self, other: &Self ) -> Option<Ordering> {
281
+ /// fn partial_cmp(&self, other: &Person ) -> Option<Ordering> {
282
282
/// Some(self.cmp(other))
283
283
/// }
284
284
/// }
285
285
///
286
286
/// impl PartialEq for Person {
287
- /// fn eq(&self, other: &Self ) -> bool {
287
+ /// fn eq(&self, other: &Person ) -> bool {
288
288
/// self.height == other.height
289
289
/// }
290
290
/// }
@@ -359,7 +359,7 @@ impl PartialOrd for Ordering {
359
359
///
360
360
/// ```
361
361
/// impl PartialOrd for Person {
362
- /// fn partial_cmp(&self, other: &Self ) -> Option<Ordering> {
362
+ /// fn partial_cmp(&self, other: &Person ) -> Option<Ordering> {
363
363
/// Some(self.cmp(other))
364
364
/// }
365
365
/// }
@@ -379,13 +379,13 @@ impl PartialOrd for Ordering {
379
379
/// }
380
380
///
381
381
/// impl PartialOrd for Person {
382
- /// fn partial_cmp(&self, other: &Self ) -> Option<Ordering> {
382
+ /// fn partial_cmp(&self, other: &Person ) -> Option<Ordering> {
383
383
/// self.height.partial_cmp(&other.height)
384
384
/// }
385
385
/// }
386
386
///
387
387
/// impl PartialEq for Person {
388
- /// fn eq(&self, other: &Self ) -> bool {
388
+ /// fn eq(&self, other: &Person ) -> bool {
389
389
/// self.height == other.height
390
390
/// }
391
391
/// }
0 commit comments