Skip to content

Commit 40ca376

Browse files
romain-at-adacoreDana Binkley
authored andcommitted
Remove back ticks
1 parent 9923afe commit 40ca376

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

  • courses/rust_essentials/080_pattern_matching/lab

courses/rust_essentials/080_pattern_matching/lab/answer/src/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ fn main() {
2323

2424

2525
// TASK 2 - Refutable Pattern in a 'let' Binding
26-
// Hint: Every `let` binding uses a pattern, but simple bindings require irrefutable patterns
26+
// Hint: Every 'let' binding uses a pattern, but simple bindings require irrefutable patterns
2727
let secret_value = Some(42);
2828

29-
// Fix: Used `if let` to handle the conditional/refutable pattern
29+
// Fix: Used 'if let' to handle the conditional/refutable pattern
3030
if let Some(x) = secret_value {
3131
println!("The secret is {}", x);
3232
}
@@ -42,7 +42,7 @@ fn main() {
4242

4343
let p = Player { name: String::from("Hero"), health: 100, mana: 50 };
4444

45-
// Fix: Added `..` to explicitly ignore the `mana` field
45+
// Fix: Added '..' to explicitly ignore the 'mana' field
4646
let Player { name, health, .. } = p;
4747

4848

@@ -55,7 +55,7 @@ fn main() {
5555

5656
let a = Alert::Warning(String::from("Low Battery"));
5757
match a {
58-
// Fix: Added `(_)` to properly account for the payload while ignoring it
58+
// Fix: Added '(_)' to properly account for the payload while ignoring it
5959
Alert::Warning(_) => println!("Received a warning, ignoring details"),
6060
Alert::Clear => println!("All clear"),
6161
}
@@ -67,7 +67,7 @@ fn main() {
6767
match temperature {
6868
t if t > 25 => println!("Hot"),
6969
t if t <= 25 => println!("Cool"),
70-
_ => unreachable!(), // Fix: Added the wildcard `_` catch-all arm
70+
_ => unreachable!(), // Fix: Added the wildcard '_' catch-all arm
7171
}
7272

7373

@@ -112,7 +112,7 @@ fn main() {
112112
// Hint: Use the '@' operator to give a name to a value while checking it against a range
113113
let dice_roll = 4;
114114
match dice_roll {
115-
// Fix: Placed the identifier `roll` before the `@` and the range pattern
115+
// Fix: Placed the identifier 'roll' before the '@' and the range pattern
116116
roll @ 1..=6 => println!("Rolled a {}", roll),
117117
_ => println!("Invalid roll"),
118118
}

courses/rust_essentials/080_pattern_matching/lab/prompt/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323

2424

2525
// TASK 2 - Refutable Pattern in a 'let' Binding
26-
// Hint: Every `let` binding uses a pattern, but simple bindings require irrefutable patterns
26+
// Hint: Every 'let' binding uses a pattern, but simple bindings require irrefutable patterns
2727
let secret_value = Some(42);
2828

2929
let Some(x) = secret_value;

0 commit comments

Comments
 (0)