Created
October 4, 2022 09:51
-
-
Save berkes/480c233fc70f98e40f1576bbd906d061 to your computer and use it in GitHub Desktop.
PartialEq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(PartialEq) | |
pub struct EmailAddress { | |
//... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl PartialEq for EmailAddress { | |
fn eq(&self, other: &Self) -> bool { | |
self.value == other.value | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment