From b90f642029568dc4260601693f2e13cd41637048 Mon Sep 17 00:00:00 2001 From: liv Date: Wed, 9 Jan 2019 21:26:12 +0100 Subject: [PATCH] remove the ex*.rs files --- ex6.rs | 47 ----------------------------------------------- exercises/ex1.rs | 6 ------ exercises/ex2.rs | 10 ---------- exercises/ex3.rs | 10 ---------- exercises/ex4.rs | 14 -------------- exercises/ex5.rs | 22 ---------------------- src/verify.rs | 5 ----- 7 files changed, 114 deletions(-) delete mode 100644 ex6.rs delete mode 100755 exercises/ex1.rs delete mode 100755 exercises/ex2.rs delete mode 100755 exercises/ex3.rs delete mode 100755 exercises/ex4.rs delete mode 100755 exercises/ex5.rs diff --git a/ex6.rs b/ex6.rs deleted file mode 100644 index 33e589d4..00000000 --- a/ex6.rs +++ /dev/null @@ -1,47 +0,0 @@ -// ex6.rs -// Make me compile! Scroll down for hints :) - -fn main() { - let robot_name = Some(String::from("Bors")); - - match robot_name { - Some(name) => println!("Found a name: {}", name), - None => (), - } - - println!("robot_name is: {:?}", robot_name); -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// Hint: The following two statements are equivalent: -// let x = &y; -// let ref x = y; diff --git a/exercises/ex1.rs b/exercises/ex1.rs deleted file mode 100755 index dc5f9caf..00000000 --- a/exercises/ex1.rs +++ /dev/null @@ -1,6 +0,0 @@ -// ex1.rs -// Make me compile! :) - -fn main() { - println(); -} diff --git a/exercises/ex2.rs b/exercises/ex2.rs deleted file mode 100755 index 0fd714de..00000000 --- a/exercises/ex2.rs +++ /dev/null @@ -1,10 +0,0 @@ -// ex2.rs -// Make me compile! - -fn something() -> String { - "hi!" -} - -fn main() { - println!("{}", something()); -} diff --git a/exercises/ex3.rs b/exercises/ex3.rs deleted file mode 100755 index db27ad2c..00000000 --- a/exercises/ex3.rs +++ /dev/null @@ -1,10 +0,0 @@ -// ex3.rs -// Make me compile! - -struct Foo { - capacity: i32, -} - -fn main() { - println!("{:?}", Foo { capacity: 3 }); -} diff --git a/exercises/ex4.rs b/exercises/ex4.rs deleted file mode 100755 index 362a5570..00000000 --- a/exercises/ex4.rs +++ /dev/null @@ -1,14 +0,0 @@ -// ex4.rs -// Make me compile! - -fn something() -> Result { - let x:i32 = "3".parse(); - Ok(x * 4) -} - -fn main() { - match something() { - Ok(..) => println!("You win!"), - Err(e) => println!("Oh no something went wrong: {}", e), - } -} diff --git a/exercises/ex5.rs b/exercises/ex5.rs deleted file mode 100755 index 2eb8cfd6..00000000 --- a/exercises/ex5.rs +++ /dev/null @@ -1,22 +0,0 @@ -// ex5.rs -// Make me compile! - -enum Reaction<'a> { - Sad(&'a str), - Happy(&'a str), -} - -fn express(sentiment: Reaction) { - match sentiment { - Reaction::Sad(s) => println!(":( {}", s), - Reaction::Happy(s) => println!(":) {}", s), - } -} - -fn main () { - let x = Reaction::Happy("It's a great day for Rust!"); - express(x); - express(x); - let y = Reaction::Sad("This code doesn't compile yet."); - express(y); -} diff --git a/src/verify.rs b/src/verify.rs index 4da15620..b396dc09 100644 --- a/src/verify.rs +++ b/src/verify.rs @@ -4,11 +4,6 @@ use indicatif::ProgressBar; use std::process::Command; pub fn verify() -> Result<(), ()> { - compile_only("exercises/ex1.rs")?; - compile_only("exercises/ex2.rs")?; - compile_only("exercises/ex3.rs")?; - compile_only("exercises/ex4.rs")?; - compile_only("exercises/ex5.rs")?; compile_only("exercises/variables/variables1.rs")?; compile_only("exercises/variables/variables2.rs")?; compile_only("exercises/variables/variables3.rs")?;