From b9b008c1d4a730335bdc9d465b0fdf7869fb09d4 Mon Sep 17 00:00:00 2001 From: Hunter Kvalevog Date: Sun, 27 Sep 2026 12:11:32 -0500 Subject: rustlings: complete 13 --- rustlings/exercises/13_error_handling/errors3.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rustlings/exercises/13_error_handling/errors3.rs') diff --git a/rustlings/exercises/13_error_handling/errors3.rs b/rustlings/exercises/13_error_handling/errors3.rs index 8e8c38a..bf21bbc 100644 --- a/rustlings/exercises/13_error_handling/errors3.rs +++ b/rustlings/exercises/13_error_handling/errors3.rs @@ -15,7 +15,7 @@ fn total_cost(item_quantity: &str) -> Result { // TODO: Fix the compiler error by changing the signature and body of the // `main` function. -fn main() { +fn main() -> Result<(), ParseIntError> { let mut tokens = 100; let pretend_user_input = "8"; @@ -28,4 +28,6 @@ fn main() { tokens -= cost; println!("You now have {tokens} tokens."); } + + Ok(()) } -- cgit v1.2.3