From 67cdcc2e12118becb823e20a40cc2687f2b8425a Mon Sep 17 00:00:00 2001 From: Adam Carpenter <53hornet@gmail.com> Date: Wed, 27 Mar 2019 15:32:37 -0400 Subject: Started Rust in Action MEAP. --- crates/Cargo.lock | 4 ---- crates/Cargo.toml | 7 ------- crates/src/lib.rs | 33 --------------------------------- crates/src/main.rs | 8 -------- 4 files changed, 52 deletions(-) delete mode 100644 crates/Cargo.lock delete mode 100644 crates/Cargo.toml delete mode 100644 crates/src/lib.rs delete mode 100644 crates/src/main.rs (limited to 'crates') diff --git a/crates/Cargo.lock b/crates/Cargo.lock deleted file mode 100644 index 3e95fa1..0000000 --- a/crates/Cargo.lock +++ /dev/null @@ -1,4 +0,0 @@ -[[package]] -name = "crates" -version = "0.1.0" - diff --git a/crates/Cargo.toml b/crates/Cargo.toml deleted file mode 100644 index 202ff1d..0000000 --- a/crates/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "crates" -version = "0.1.0" -authors = ["53hornet <53hornet@gmail.com>"] -edition = "2018" - -[dependencies] diff --git a/crates/src/lib.rs b/crates/src/lib.rs deleted file mode 100644 index 5cf1d97..0000000 --- a/crates/src/lib.rs +++ /dev/null @@ -1,33 +0,0 @@ -//! # Art -//! -//! A library for modeling artistic concepts. - -pub use kinds::PrimaryColor; -pub use kinds::SecondaryColor; -pub use utils::mix; - -pub mod kinds { - /// The primary colors according to the RYB color model. - pub enum PrimaryColor { - Red, - Yellow, - Blue, - } - - /// The secondary colors according to the RYB color model. - pub enum SecondaryColor { - Orange, - Green, - Purple, - } -} - -pub mod utils { - use crate::kinds::*; - - /// Combines two primary color in equal amounts to create - /// a secondary color. - pub fn mix(c1: PrimaryColor, c2: PrimaryColor) -> SecondaryColor { - SecondaryColor::Green - } -} diff --git a/crates/src/main.rs b/crates/src/main.rs deleted file mode 100644 index 80668f2..0000000 --- a/crates/src/main.rs +++ /dev/null @@ -1,8 +0,0 @@ -use art::PrimaryColor; -use art::mix; - -fn main() { - let red = PrimaryColor::Red, - let yellow = PrimaryColor::Yellow; - mix(red, yellow); -} -- cgit v1.2.3