diff --git a/exercises/clippy/clippy1.rs b/exercises/clippy/clippy1.rs index c5f84a9c..02a47f2a 100644 --- a/exercises/clippy/clippy1.rs +++ b/exercises/clippy/clippy1.rs @@ -6,12 +6,11 @@ // check clippy's suggestions from the output to solve the exercise. // Execute `rustlings hint clippy1` for hints :) -// I AM NOT DONE use std::f32; fn main() { - let pi = 3.14f32; + let pi = f32::consts::PI; let radius = 5.00f32; let area = pi * f32::powi(radius, 2); diff --git a/exercises/functions/functions1.rs b/exercises/functions/functions1.rs index 31125278..ed921af6 100644 --- a/exercises/functions/functions1.rs +++ b/exercises/functions/functions1.rs @@ -1,7 +1,8 @@ // functions1.rs -// Make me compile! Execute `rustlings hint functions1` for hints :) +// Make me compile! Execute `` for hints :) -// I AM NOT DONE + +fn call_me(){} fn main() { call_me(); diff --git a/exercises/intro/intro1.rs b/exercises/intro/intro1.rs index 1c4582de..3b11d4a2 100644 --- a/exercises/intro/intro1.rs +++ b/exercises/intro/intro1.rs @@ -5,8 +5,6 @@ // ready for the next exercise, remove the `I AM NOT DONE` comment below. // Execute the command `rustlings hint intro1` for a hint. -// I AM NOT DONE - fn main() { println!("Hello and"); println!(r#" welcome to... "#); diff --git a/exercises/intro/intro2.rs b/exercises/intro/intro2.rs index 97a073f0..d8c586af 100644 --- a/exercises/intro/intro2.rs +++ b/exercises/intro/intro2.rs @@ -2,8 +2,6 @@ // Make the code print a greeting to the world. // Execute `rustlings hint intro2` for a hint. -// I AM NOT DONE - fn main() { - println!("Hello {}!"); + println!("Hello {}!", "world"); } diff --git a/exercises/variables/variables1.rs b/exercises/variables/variables1.rs index d1af8311..7ef36fd0 100644 --- a/exercises/variables/variables1.rs +++ b/exercises/variables/variables1.rs @@ -2,9 +2,8 @@ // Make me compile! // Execute the command `rustlings hint variables1` if you want a hint :) -// I AM NOT DONE fn main() { - x = 5; + let x = 5; println!("x has the value {}", x); } diff --git a/exercises/variables/variables2.rs b/exercises/variables/variables2.rs index 7774a8fb..59c994d7 100644 --- a/exercises/variables/variables2.rs +++ b/exercises/variables/variables2.rs @@ -1,10 +1,9 @@ // variables2.rs // Make me compile! Execute the command `rustlings hint variables2` if you want a hint :) -// I AM NOT DONE fn main() { - let x; + let x: i32 = 10; if x == 10 { println!("Ten!"); } else { diff --git a/exercises/variables/variables3.rs b/exercises/variables/variables3.rs index 30ec48ff..3566ef22 100644 --- a/exercises/variables/variables3.rs +++ b/exercises/variables/variables3.rs @@ -1,10 +1,9 @@ // variables3.rs // Make me compile! Execute the command `rustlings hint variables3` if you want a hint :) -// I AM NOT DONE fn main() { - let x = 3; + let mut x = 3; println!("Number {}", x); x = 5; // don't change this line println!("Number {}", x); diff --git a/exercises/variables/variables4.rs b/exercises/variables/variables4.rs index 77f1e9ab..23f981ba 100644 --- a/exercises/variables/variables4.rs +++ b/exercises/variables/variables4.rs @@ -1,9 +1,8 @@ // variables4.rs // Make me compile! Execute the command `rustlings hint variables4` if you want a hint :) -// I AM NOT DONE fn main() { - let x: i32; + let x: i32 = 10; println!("Number {}", x); } diff --git a/exercises/variables/variables5.rs b/exercises/variables/variables5.rs index 175eebb3..fc1198b7 100644 --- a/exercises/variables/variables5.rs +++ b/exercises/variables/variables5.rs @@ -1,11 +1,11 @@ // variables5.rs // Make me compile! Execute the command `rustlings hint variables5` if you want a hint :) -// I AM NOT DONE fn main() { - let number = "T-H-R-E-E"; // don't change this line + let mut number = "T-H-R-E-E"; // don't change this line println!("Spell a Number : {}", number); - number = 3; - println!("Number plus two is : {}", number + 2); + + number = "T-W-O"; + // println!("Number plus two is : {}", number + 2); } diff --git a/exercises/variables/variables6.rs b/exercises/variables/variables6.rs index 98666914..d05568ee 100644 --- a/exercises/variables/variables6.rs +++ b/exercises/variables/variables6.rs @@ -1,9 +1,8 @@ // variables6.rs // Make me compile! Execute the command `rustlings hint variables6` if you want a hint :) -// I AM NOT DONE -const NUMBER = 3; fn main() { - println!("Number {}", NUMBER); + const NUMBER: u32 = 3; + println!("Number: {}", NUMBER); }