Skip to content

Commit

Permalink
Change phrasing around application complexity growth and Results
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelraz committed Feb 5, 2025
1 parent 28f197e commit 7ef7c3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions training-slides/src/dealing-with-unwrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ pub fn find_user(username: &str) -> Result<UserId, Err> {
}
```

* As application complexity grows (and examples would no longer fit on a slide), prefer the
additional context of `Result<T, E>` over the simple `Option<T>`.
* Because `Result<T, E>` provides more information than `Option<T>`, growing applications tend to encompass more `Result`s
* This means there is a tendency to take `Option`s that arise in your code and you must transform them into `Result<T, E>`
* There are stdlib functions to handle those transitions

## Result to Result
Expand Down

0 comments on commit 7ef7c3c

Please sign in to comment.