make `Err` description easier to digest

pull/119/head
hoijui 3 years ago committed by GitHub
parent 921df25b51
commit 128ad623d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3681,7 +3681,7 @@ enum Result<T, E> {
fn main() {}
```
So Result has a value inside of `Ok`, and a value inside of `Err`. That is because errors usually (and should have) have information inside them.
So Result has a value inside of `Ok`, and a value inside of `Err`. That is because errors usually contain information that describes the error.
`Result<T, E>` means you need to think of what you want to return for `Ok`, and what you want to return for `Err`. Actually, you can decide anything. Even this is okay:

Loading…
Cancel
Save