Add comment about manual PartialEq impl

This commit is contained in:
expectocode 2019-12-31 00:11:11 +00:00
parent bc1ba4f88e
commit f071cafe51
1 changed files with 1 additions and 0 deletions

View File

@ -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