Skip to content

Commit 1a7bb5a

Browse files
author
marisa
committed
Address feedback
1 parent 48c35bc commit 1a7bb5a

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

exercises/error_handling/errorsn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// type goes where the question marks are, and how do we return
1414
// that type from the body of read_and_validate?
1515
//
16-
// Execute `rustlings hint errors4` for hints :)
16+
// Execute `rustlings hint errorsn` for hints :)
1717

1818
// I AM NOT DONE
1919

exercises/error_handling/result1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// result1.rs
2-
// Make this test pass! Execute `rustlings hint option2` for hints :)
2+
// Make this test pass! Execute `rustlings hint result1` for hints :)
33

44
// I AM NOT DONE
55

exercises/functions/functions1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// functions1.rs
2-
// Make me compile! Execute `rustlings hint function1` for hints :)
2+
// Make me compile! Execute `rustlings hint functions1` for hints :)
33

44
// I AM NOT DONE
55

info.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ hint = """
456456
If other functions can return a `Result`, why shouldn't `main`?"""
457457

458458
[[exercises]]
459-
name = "errors4"
459+
name = "errorsn"
460460
path = "exercises/error_handling/errorsn.rs"
461461
mode = "test"
462462
hint = """
@@ -507,7 +507,7 @@ Or use an `if let` statement on the result of `pop()` to both destructure
507507
a `Some` value and only print out something if we have a value!"""
508508

509509
[[exercises]]
510-
name = "option2"
510+
name = "result1"
511511
path = "exercises/error_handling/result1.rs"
512512
mode = "test"
513513
hint = """

src/main.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ fn main() {
6060
let exercises = toml::from_str::<ExerciseList>(toml_str).unwrap().exercises;
6161

6262
if let Some(ref matches) = matches.subcommand_matches("run") {
63-
let name = matches.value_of("name").unwrap_or_else(|| {
64-
println!("Please supply an exercise name!");
65-
std::process::exit(1);
66-
});
63+
let name = matches.value_of("name").unwrap();
6764

6865
let matching_exercise = |e: &&Exercise| name == e.name;
6966

@@ -76,10 +73,7 @@ fn main() {
7673
}
7774

7875
if let Some(ref matches) = matches.subcommand_matches("hint") {
79-
let name = matches.value_of("name").unwrap_or_else(|| {
80-
println!("Please supply an exercise name!");
81-
std::process::exit(1);
82-
});
76+
let name = matches.value_of("name").unwrap();
8377

8478
let exercise = exercises
8579
.iter()

0 commit comments

Comments
 (0)