comments_lansscar/
lib.rs

1//! # comments
2//!
3//! `comments` is a collection to test the doc.
4
5/// Adds one to the number given.
6///
7/// # Example
8///
9/// ```
10/// let five = 5;
11///
12/// assert_eq!(6, comments::add_one(5));
13/// ```
14pub fn add_one(x: i32) -> i32 {
15	x + 1
16}
17
18#[cfg(test)]
19mod tests {
20    #[test]
21    fn it_works() {
22        assert_eq!(2 + 2, 4);
23    }
24}