1pub use self::kinds::PrimaryColor;
7pub use self::kinds::SecondaryColor;
8pub use self::utils::mix;
9
10pub mod kinds {
11 pub enum PrimaryColor {
13 Red,
14 Yellow,
15 Blue,
16 Red2,
17 }
18
19 pub enum SecondaryColor {
21 Orange,
22 Green,
23 Purple,
24 }
25}
26
27pub mod utils {
28 use crate::kinds::*;
29
30 pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor {
33 SecondaryColor::Orange
35 }
36}
37
38#[cfg(test)]
39mod tests {
40 #[test]
41 fn it_works() {
42 assert_eq!(2 + 2, 4);
43 }
44}