Skip to content

Commit

Permalink
clarify Option in 07_errors.md (#75)
Browse files Browse the repository at this point in the history
Clarify `Some(T)` for `Option` is the equivalent of `Ok(T)` for `Results`
  • Loading branch information
SimonDeRidder authored Feb 25, 2024
1 parent 04f6a98 commit bd513f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/view/07_errors.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Error Handling

[In the last chapter](./06_control_flow.md), we saw that you can render `Option<T>`:
in the `None` case, it will render nothing, and in the `T` case, it will render `T`
in the `None` case, it will render nothing, and in the `Some(T)` case, it will render `T`
(that is, if `T` implements `IntoView`). You can actually do something very similar
with a `Result<T, E>`. In the `Err(_)` case, it will render nothing. In the `Ok(T)`
case, it will render the `T`.
Expand Down

0 comments on commit bd513f4

Please sign in to comment.