//! # cargo_more
//!
//! `cargo_more` is a collection of utilities to make performing certain
//! calculations more convenient. 这种文档是用来描述整个 crate 的文档。一般放在lib.rs 或 main.rs

pub mod kinds;
pub mod utils;

// 重导出一些层级较深的结构，使得用户可以更快的找到和使用他们
pub use self::kinds::PrimaryColor;
pub use self::kinds::SecondaryColor;
pub use self::utils::mix;

/// Adds one to the number given
///
/// # Examples
///
/// ```
/// // cargo test 连示例程序也会测试运行
/// let arg = 5;
/// let answer = tomoko_cargo_more::add_one(arg);
///
/// assert_eq!(6, answer);
/// ```
///
/// # Panics
/// This function might panic if the x is not i32 value
pub fn add_one(x: i32) -> i32 {
    x + 1
}

/// Add two to the number given
///
/// # Examples
///
/// ```
/// let arg = 1;
/// let answer = tomoko_cargo_more::add_two(arg);
///
/// assert_eq!(answer, 3);
/// ```
pub fn add_two(x: i32) -> i32 {
    x + 2
}
