Skip to content

Commit

Permalink
fix: rename result1 to errors4
Browse files Browse the repository at this point in the history
Also put it in the ERROR HANDLING section where it probably belongs.
  • Loading branch information
tlyu committed Jun 7, 2021
1 parent a2f0401 commit 50ab289
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// result1.rs
// Make this test pass! Execute `rustlings hint result1` for hints :)
// errors4.rs
// Make this test pass! Execute `rustlings hint errors4` for hints :)

// I AM NOT DONE

Expand Down
20 changes: 10 additions & 10 deletions info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,15 @@ mode = "compile"
hint = """
If other functions can return a `Result`, why shouldn't `main`?"""

[[exercises]]
name = "errors4"
path = "exercises/error_handling/errors4.rs"
mode = "test"
hint = """
`PositiveNonzeroInteger::new` is always creating a new instance and returning an `Ok` result.
It should be doing some checking, returning an `Err` result if those checks fail, and only
returning an `Ok` result if those checks determine that everything is... okay :)"""

[[exercises]]
name = "errorsn"
path = "exercises/error_handling/errorsn.rs"
Expand Down Expand Up @@ -561,7 +570,7 @@ ReportCard struct generic, but also the correct property - you will need to chan
of the struct slightly too...you can do it!
"""

# OPTIONS / RESULTS
# OPTIONS

[[exercises]]
name = "option1"
Expand Down Expand Up @@ -603,15 +612,6 @@ statement. How can this be avoided? The compiler shows the correction
needed. After making the correction as suggested by the compiler, do
read: https://doc.rust-lang.org/std/keyword.ref.html"""

[[exercises]]
name = "result1"
path = "exercises/error_handling/result1.rs"
mode = "test"
hint = """
`PositiveNonzeroInteger::new` is always creating a new instance and returning an `Ok` result.
It should be doing some checking, returning an `Err` result if those checks fail, and only
returning an `Ok` result if those checks determine that everything is... okay :)"""

# TRAITS

[[exercises]]
Expand Down

0 comments on commit 50ab289

Please sign in to comment.