1
2
3pub use self::kinds::PrimaryColor;
8pub use self::kinds::SecondaryColor;
9pub use self::utils::mix;
10
11pub mod kinds {
12 pub enum PrimaryColor {
14 Red,
15 Yellow,
16 Blue,
17 }
18
19 pub enum SecondaryColor {
21 Orange,
22 Green,
23 Purple,
24 }
25}
26
27
28pub mod utils {
29 use crate::kinds::*;
30
31 pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor {
34 SecondaryColor::Green
36 }
37}
38
39
40
41
42
43
44
45
46#[cfg(test)]
47mod tests {
48 use super::*;
49
50 #[test]
51 fn it_works() {
52 }
53}