summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAdam Carpenter <53hornet@gmail.com>2019-03-27 15:32:37 -0400
committerAdam Carpenter <53hornet@gmail.com>2019-03-27 15:32:37 -0400
commit67cdcc2e12118becb823e20a40cc2687f2b8425a (patch)
treeed92c3234b89079e6d4cf36f5e80c5ffa79def48 /crates
parente25482fca375d318a39c3b54db396b0db6e0b263 (diff)
downloadlearning-rust-67cdcc2e12118becb823e20a40cc2687f2b8425a.tar.xz
learning-rust-67cdcc2e12118becb823e20a40cc2687f2b8425a.zip
Started Rust in Action MEAP.
Diffstat (limited to 'crates')
-rw-r--r--crates/Cargo.lock4
-rw-r--r--crates/Cargo.toml7
-rw-r--r--crates/src/lib.rs33
-rw-r--r--crates/src/main.rs8
4 files changed, 0 insertions, 52 deletions
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);
-}