Skip to content

Commit b6e7283

Browse files
committed
Use Self more in core/src/cmp.rs
1 parent e0bc267 commit b6e7283

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/cmp.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,19 +726,19 @@ impl PartialOrd for Ordering {
726726
/// }
727727
///
728728
/// impl PartialOrd for Person {
729-
/// fn partial_cmp(&self, other: &Person) -> Option<Ordering> {
729+
/// fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
730730
/// Some(self.cmp(other))
731731
/// }
732732
/// }
733733
///
734734
/// impl Ord for Person {
735-
/// fn cmp(&self, other: &Person) -> Ordering {
735+
/// fn cmp(&self, other: &Self) -> Ordering {
736736
/// self.height.cmp(&other.height)
737737
/// }
738738
/// }
739739
///
740740
/// impl PartialEq for Person {
741-
/// fn eq(&self, other: &Person) -> bool {
741+
/// fn eq(&self, other: &Self) -> bool {
742742
/// self.height == other.height
743743
/// }
744744
/// }

0 commit comments

Comments
 (0)