Created
July 29, 2022 07:07
-
-
Save kriogenia/480f39123b4af3c3f6653549eafc9531 to your computer and use it in GitHub Desktop.
&Coutner implementing Add<Self>
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 Add for &Counter { | |
type Output = Counter; | |
fn add(self, rhs: Self) -> Self::Output { | |
Counter(self.0 + rhs.0) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment