Skip to content

Commit 50ab289

Browse files
committed
fix: rename result1 to errors4
Also put it in the ERROR HANDLING section where it probably belongs.
1 parent a2f0401 commit 50ab289

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

exercises/error_handling/result1.rs renamed to exercises/error_handling/errors4.rs

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

44
// I AM NOT DONE
55

info.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,15 @@ mode = "compile"
489489
hint = """
490490
If other functions can return a `Result`, why shouldn't `main`?"""
491491

492+
[[exercises]]
493+
name = "errors4"
494+
path = "exercises/error_handling/errors4.rs"
495+
mode = "test"
496+
hint = """
497+
`PositiveNonzeroInteger::new` is always creating a new instance and returning an `Ok` result.
498+
It should be doing some checking, returning an `Err` result if those checks fail, and only
499+
returning an `Ok` result if those checks determine that everything is... okay :)"""
500+
492501
[[exercises]]
493502
name = "errorsn"
494503
path = "exercises/error_handling/errorsn.rs"
@@ -561,7 +570,7 @@ ReportCard struct generic, but also the correct property - you will need to chan
561570
of the struct slightly too...you can do it!
562571
"""
563572

564-
# OPTIONS / RESULTS
573+
# OPTIONS
565574

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

606-
[[exercises]]
607-
name = "result1"
608-
path = "exercises/error_handling/result1.rs"
609-
mode = "test"
610-
hint = """
611-
`PositiveNonzeroInteger::new` is always creating a new instance and returning an `Ok` result.
612-
It should be doing some checking, returning an `Err` result if those checks fail, and only
613-
returning an `Ok` result if those checks determine that everything is... okay :)"""
614-
615615
# TRAITS
616616

617617
[[exercises]]

0 commit comments

Comments
 (0)