cargo_semantic_release_template/
lib.rs

1pub fn sum(a: i32, b: i32) -> i32 {
2    a + b
3}
4
5pub fn div(a: i32, b: i32) -> i32 {
6    a / b
7}
8
9#[cfg(test)]
10mod tests {
11    use super::*;
12
13    #[test]
14    fn test_sum() {
15        assert_eq!(sum(1, 2), 3);
16    }
17
18    #[test]
19    fn test_div() {
20        assert_eq!(div(4, 2), 2);
21    }
22}