mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-27 00:00:03 +03:00
fix: rename result1 to errors4
Also put it in the ERROR HANDLING section where it probably belongs.
This commit is contained in:
parent
a2f0401c4c
commit
50ab289da6
|
@ -1,5 +1,5 @@
|
||||||
// result1.rs
|
// errors4.rs
|
||||||
// Make this test pass! Execute `rustlings hint result1` for hints :)
|
// Make this test pass! Execute `rustlings hint errors4` for hints :)
|
||||||
|
|
||||||
// I AM NOT DONE
|
// I AM NOT DONE
|
||||||
|
|
20
info.toml
20
info.toml
|
@ -489,6 +489,15 @@ mode = "compile"
|
||||||
hint = """
|
hint = """
|
||||||
If other functions can return a `Result`, why shouldn't `main`?"""
|
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]]
|
[[exercises]]
|
||||||
name = "errorsn"
|
name = "errorsn"
|
||||||
path = "exercises/error_handling/errorsn.rs"
|
path = "exercises/error_handling/errorsn.rs"
|
||||||
|
@ -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!
|
of the struct slightly too...you can do it!
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# OPTIONS / RESULTS
|
# OPTIONS
|
||||||
|
|
||||||
[[exercises]]
|
[[exercises]]
|
||||||
name = "option1"
|
name = "option1"
|
||||||
|
@ -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
|
needed. After making the correction as suggested by the compiler, do
|
||||||
read: https://doc.rust-lang.org/std/keyword.ref.html"""
|
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
|
# TRAITS
|
||||||
|
|
||||||
[[exercises]]
|
[[exercises]]
|
||||||
|
|
Loading…
Reference in a new issue