super_lib/lib.rs
1//! # Super Lib
2//!
3//! `super_lib` is a collection of utilities written by Jimmy Chu to demonstrate
4//! his coding prowess.
5
6
7/// Adds one to the number given.
8///
9/// # Examples
10///
11/// ```
12/// use super_lib;
13/// let arg = 5;
14///
15/// assert_eq!(6, super_lib::add_one(arg));
16/// ```
17
18pub fn add_one(x: i32) -> i32 {
19 x + 1
20}
21
22#[cfg(test)]
23mod tests {
24 #[test]
25 fn it_works() {
26 assert_eq!(2 + 2, 4);
27 }
28}