Created
December 10, 2017 22:35
-
-
Save stiv-yakovenko/e4448db2596c6ea5152afe6ee586c93e to your computer and use it in GitHub Desktop.
rust_shit_code
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
pub fn sum(&self) -> i16 { | |
let mut r = 0i16; | |
for (_, v) in &self.0 { | |
r += *v as i16; | |
} | |
r | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment