summaryrefslogtreecommitdiff
path: root/rustlings/exercises/13_error_handling/errors5.rs
diff options
context:
space:
mode:
authorHunter Kvalevog <hunter@kvog.sh>2026-09-27 12:11:32 -0500
committerHunter Kvalevog <hunter@kvog.sh>2026-09-27 12:11:32 -0500
commitb9b008c1d4a730335bdc9d465b0fdf7869fb09d4 (patch)
treee9695905445b4bab89c07b8662fe40207b74c288 /rustlings/exercises/13_error_handling/errors5.rs
parent1da0f56d76e5d5117eac05af092bf0ab58b14c8f (diff)
rustlings: complete 13
Diffstat (limited to 'rustlings/exercises/13_error_handling/errors5.rs')
-rw-r--r--rustlings/exercises/13_error_handling/errors5.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rustlings/exercises/13_error_handling/errors5.rs b/rustlings/exercises/13_error_handling/errors5.rs
index 125779b..405f0dc 100644
--- a/rustlings/exercises/13_error_handling/errors5.rs
+++ b/rustlings/exercises/13_error_handling/errors5.rs
@@ -48,7 +48,7 @@ impl PositiveNonzeroInteger {
// TODO: Add the correct return type `Result<(), Box<dyn ???>>`. What can we
// use to describe both errors? Is there a trait which both errors implement?
-fn main() {
+fn main() -> Result<(), Box<dyn Error>> {
let pretend_user_input = "42";
let x: i64 = pretend_user_input.parse()?;
println!("output={:?}", PositiveNonzeroInteger::new(x)?);