calchy/
lib.rs

1//! # Calchy
2//! 
3//! `calchy` is a collection of utilities to make performing certain
4//! calculations more convenient.
5
6/// Adds two to the number given.
7/// 
8/// # Examples
9/// 
10/// ```
11/// let arg = 5;
12/// let answer = calchy::add_two(arg);
13/// 
14/// assert_eq!(7, answer);
15/// ```
16pub fn add_two(x: i32) -> i32 {
17    x + 2
18}
19
20
21#[cfg(test)]
22mod tests {
23    #[test]
24    fn it_works() {
25        let result = 2 + 2;
26        assert_eq!(result, 4);
27    }
28}