From 8ef0d03cf1841b98cfcabb71019bac6f9afaad83 Mon Sep 17 00:00:00 2001 From: Hariettemaina Date: Thu, 25 May 2023 11:01:55 +0300 Subject: [PATCH] update the return type --- exercises/error_handling/errors5.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/error_handling/errors5.rs b/exercises/error_handling/errors5.rs index eb5506cb..37c4dda4 100644 --- a/exercises/error_handling/errors5.rs +++ b/exercises/error_handling/errors5.rs @@ -16,14 +16,14 @@ // Execute `rustlings hint errors5` or use the `hint` watch subcommand for a hint. -// I AM NOT DONE + use std::error; use std::fmt; use std::num::ParseIntError; // TODO: update the return type of `main()` to make this compile. -fn main() -> Result<(), Box> { +fn main() -> Result<(), Box> { let pretend_user_input = "42"; let x: i64 = pretend_user_input.parse()?; println!("output={:?}", PositiveNonzeroInteger::new(x)?);