1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! # My Crate
//!
//! `my_crate` is a collection of utilities to make performing certain
//! calculations more convinient
//!
//! # Utils
//!
//! `utils` is a collection of utils that helps to perform
/// Adds one to the number given.
///
/// # Examples
///
/// ``````
/// let arg = 5;
/// let answer = my_crate::add_one(arg);
///
/// assert_eq!(6, answer);
/// ```
/// Squares the given number
///
/// # Example
///
/// ```
/// let number = 5;
/// let result = square(number);
///
/// assert_eq!(25, result);
/// ```
/// Calculate the length of the given string
///
/// # Example
///
/// ```
/// let string = String::from("Hello world!");
/// let length = calculate_length(&string);
///
/// assert_eq!(12, length);
/// ```