cargo_hashgee_lib/
lib.rs

1//! Art 
2//! 
3//! A library for modeling artistic concepts.
4
5pub use color_kinds::PrimaryColor;
6pub use color_kinds::SecondaryColor;
7pub use utils::mix;
8
9pub mod color_kinds {
10    pub enum PrimaryColor {
11        Red,
12        Yellow,
13    }
14
15    pub enum SecondaryColor {
16        Orange,
17        Green,
18    }
19
20
21
22}
23
24pub mod utils {
25
26    use crate::color_kinds::*;
27
28    /// Combines two primary colors in equal amounts to create
29    /// a secondary color.
30    pub fn mix(_c1: PrimaryColor, _c2: PrimaryColor) -> SecondaryColor {
31        // --snip--
32
33        SecondaryColor::Green
34    }
35
36
37}
38
39
40
41
42pub fn add(left: u64, right: u64) -> u64 {
43    left + right
44}
45
46#[cfg(test)]
47mod tests {
48    use super::*;
49
50    #[test]
51    fn it_works() {
52        let result = add(2, 2);
53        assert_eq!(result, 4);
54    }
55}