Skip to content

Instantly share code, notes, and snippets.

@Jviejo
Created August 16, 2024 11:31
Show Gist options
  • Save Jviejo/fe746938b2cc7259a79953a6413002ca to your computer and use it in GitHub Desktop.
Save Jviejo/fe746938b2cc7259a79953a6413002ca to your computer and use it in GitHub Desktop.
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