mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 05:52:23 -05:00
Fix comment in errors2
This commit is contained in:
parent
64035f766f
commit
ad1c29c512
1 changed files with 3 additions and 3 deletions
|
@ -9,9 +9,9 @@
|
|||
//
|
||||
// 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 `parse` function on a string that is not a number, that function will
|
||||
// return a `ParseIntError`, and in that case, we want to immediately return
|
||||
// that error from our function and not try to multiply and add.
|
||||
// the `total_cost` function on a string that is not a number, that function
|
||||
// will return a `ParseIntError`, and 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!
|
||||
|
|
Loading…
Reference in a new issue