diff --git a/README.md b/README.md index c5d399e0..0fd6cd7f 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ This will install Rustlings and give you access to the `rustlings` command. Run ## Windows -First, set `ExecutionPolicy` to `RemoteSigned`: +In PowerShell, set `ExecutionPolicy` to `RemoteSigned`: ```ps Set-ExecutionPolicy RemoteSigned diff --git a/exercises/generics/generics3.rs b/exercises/generics/generics3.rs index cd3232a4..c76425c3 100644 --- a/exercises/generics/generics3.rs +++ b/exercises/generics/generics3.rs @@ -1,10 +1,11 @@ -// An imaginary magical school has a new report card generation system written in rust! +// An imaginary magical school has a new report card generation system written in Rust! // Currently the system only supports creating report cards where the student's grade -// is represented numerically (e.g. 1.0 -> 5.5). However, the school also issues alphabetical grades -// (A+ -> F-) and needs to be able to print both types of report card! +// is represented numerically (e.g. 1.0 -> 5.5). +// However, the school also issues alphabetical grades (A+ -> F-) and needs +// to be able to print both types of report card! -// Make the necessary code changes to support alphabetical report cards, thereby making the second -// test pass. +// Make the necessary code changes to support alphabetical report cards, thereby making +// the second test pass. // I AM NOT DONE pub struct ReportCard { @@ -15,7 +16,8 @@ pub struct ReportCard { impl ReportCard { pub fn print(&self) -> String { - format!("{} ({}) - achieved a grade of {}", &self.student_name, &self.student_age, &self.grade) + format!("{} ({}) - achieved a grade of {}", + &self.student_name, &self.student_age, &self.grade) } } diff --git a/exercises/option/option1.rs b/exercises/option/option1.rs index 40cf2fe7..1c3ddab7 100644 --- a/exercises/option/option1.rs +++ b/exercises/option/option1.rs @@ -15,7 +15,7 @@ fn main() { ]; for iter in 0..5 { let number_to_add: u16 = { - ((iter * 5) + 2) / (4 * 16) + ((iter * 1235) + 2) / (4 * 16) }; numbers[iter as usize] = Option::Some(number_to_add); diff --git a/exercises/variables/variables3.rs b/exercises/variables/variables3.rs index 2bd4d3c2..7d84709d 100644 --- a/exercises/variables/variables3.rs +++ b/exercises/variables/variables3.rs @@ -4,6 +4,6 @@ fn main() { let mut x = 3; println!("Number {}", x); - x = 5; + x = 5; // don't change this line println!("Number {}", x); } diff --git a/exercises/variables/variables5.rs b/exercises/variables/variables5.rs index 64cebb72..b87d5019 100644 --- a/exercises/variables/variables5.rs +++ b/exercises/variables/variables5.rs @@ -2,7 +2,7 @@ // Make me compile! Execute the command `rustlings hint variables5` if you want a hint :) fn main() { - let number = "3"; + let number = "3"; // don't change this line println!("Number {}", number); let number = 3; println!("Number {}", number); diff --git a/info.toml b/info.toml index e2aa82a7..66d60da2 100644 --- a/info.toml +++ b/info.toml @@ -68,7 +68,7 @@ then keyword 'let'. Constants types must also always be annotated. Read more about constants under 'Differences Between Variables and Constants' in the book's section 'Variables and Mutability': -https://doc.rust-lang.org/book/ch03-01-variables-and-mutability.html +https://doc.rust-lang.org/book/ch03-01-variables-and-mutability.html#differences-between-variables-and-constants """ # IF