From d54c05098516f2e8e5958f0b26478c85ebccb67d Mon Sep 17 00:00:00 2001 From: mo8it Date: Thu, 4 Jul 2024 13:03:05 +0200 Subject: [PATCH] Improve a comment in errors2 --- exercises/13_error_handling/errors2.rs | 10 +++++----- solutions/13_error_handling/errors2.rs | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/exercises/13_error_handling/errors2.rs b/exercises/13_error_handling/errors2.rs index e50a9299..defe359b 100644 --- a/exercises/13_error_handling/errors2.rs +++ b/exercises/13_error_handling/errors2.rs @@ -5,11 +5,11 @@ // the player typed in the quantity, we get it as a string. They might have // typed anything, not just numbers! // -// Right now, this function isn't handling the error case at all (and isn't -// handling the success case properly either). What we want to do is: If we call -// the `total_cost` function on a string that is not a number, that function -// will return a `ParseIntError`. In that case, we want to immediately return -// that error from our function and not try to multiply and add. +// Right now, this function isn't handling the error case at all. What we want +// to do is: If we call the `total_cost` function on a string that is not a +// number, that function will return a `ParseIntError`. In that case, we want to +// immediately return that error from our function and not try to multiply and +// add. // // There are at least two ways to implement this that are both correct. But one // is a lot shorter! diff --git a/solutions/13_error_handling/errors2.rs b/solutions/13_error_handling/errors2.rs index de7c32b5..f652ecb5 100644 --- a/solutions/13_error_handling/errors2.rs +++ b/solutions/13_error_handling/errors2.rs @@ -5,11 +5,11 @@ // the player typed in the quantity, we get it as a string. They might have // typed anything, not just numbers! // -// Right now, this function isn't handling the error case at all (and isn't -// handling the success case properly either). What we want to do is: If we call -// the `total_cost` function on a string that is not a number, that function -// will return a `ParseIntError`. In that case, we want to immediately return -// that error from our function and not try to multiply and add. +// Right now, this function isn't handling the error case at all. What we want +// to do is: If we call the `total_cost` function on a string that is not a +// number, that function will return a `ParseIntError`. In that case, we want to +// immediately return that error from our function and not try to multiply and +// add. // // There are at least two ways to implement this that are both correct. But one // is a lot shorter!