rust_shortcuts/
lib.rs

1mod shortcuts {
2    pub fn is_odd(val: isize) -> bool {
3        if val % 2 != 0 {
4            true
5        } else {
6            false
7        }
8    }
9}
10
11#[test]
12fn test_odd() {
13    assert!(shortcuts::is_odd(1) == true);
14    assert!(shortcuts::is_odd(2) == false);    
15}