ch14test173/lib.rs
1//! # My Crate
2//!
3//! `my_crate` is a collection of utilities to make performing certain
4//! calculations more convenient. WOWWWW
5
6/// Adds one to the number given.
7// --snip--
8/// Adds one to the number given.
9///
10/// # Examples
11///
12/// ```
13/// let arg = 5;
14/// let answer = ch14crate::add_one(arg);
15///
16/// assert_eq!(6, answer);
17/// ```
18pub fn add_one(x: i32) -> i32 {
19 x + 1
20}
21
22#[cfg(test)]
23mod tests {
24 use super::*;
25
26 // #[test]
27 // fn it_works() {
28 // let result = add(2, 2);
29 // assert_eq!(result, 4);
30 // }
31}