summaryrefslogtreecommitdiff
path: root/rustlings/exercises/13_error_handling/errors5.rs
diff options
context:
space:
mode:
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)?);