Skip to content

Instantly share code, notes, and snippets.

@yamafaktory
Last active January 24, 2019 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yamafaktory/4dd74fa2d986043e6015fa29c7ca87b8 to your computer and use it in GitHub Desktop.
Save yamafaktory/4dd74fa2d986043e6015fa29c7ca87b8 to your computer and use it in GitHub Desktop.
pub fn minus_one(number: i32) -> i32 {
number - 1
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_minus_one() {
assert_eq!(minus_one(1), 0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment