Add comment about manual PartialEq impl
This commit is contained in:
parent
bc1ba4f88e
commit
f071cafe51
|
@ -67,6 +67,7 @@ impl Add for Point {
|
|||
}
|
||||
}
|
||||
|
||||
// These can be derived too, but implement them for demonstration.
|
||||
impl PartialEq for Point {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.x == other.x && self.y == other.y
|
||||
|
|
Loading…
Reference in New Issue