Created
August 16, 2024 11:31
-
-
Save Jviejo/fe746938b2cc7259a79953a6413002ca to your computer and use it in GitHub Desktop.
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 add(left: usize, right: usize) -> usize { | |
left + right | |
} | |
#[cfg(test)] | |
mod tests { | |
use super::*; | |
#[test] | |
fn it_works() { | |
let result = add(2, 2); | |
assert_eq!(result, 4); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment