mirror of
https://github.com/darkicewolf50/RustBrock.git
synced 2025-07-06 02:57:13 -06:00
finished ch19 intro
This commit is contained in:
@ -346,7 +346,7 @@ Then we call the `unwrap` method, we know this will never panic.
|
||||
|
||||
We know the methods on `Post` ensure that `state` will always contain a `Some` value when those methods are done.
|
||||
|
||||
This is a case where we have more information than the compiler (previously discussed in [Ch 9]()) when we know that a `None` value is never possible, even though the compiler isn't able to understand that.
|
||||
This is a case where we have more information than the compiler (previously discussed in [Ch 9](./Error%20Handling.md#cases-in-which-you-have-more-info-than-the-compiler)) when we know that a `None` value is never possible, even though the compiler isn't able to understand that.
|
||||
|
||||
Now at this point, when we call `content` on the `&Box<dyn State>`, deref coercion will take effect on the `&` and the `Box` so the `content` method will ultimately be called on the type that implements the `State` trait.
|
||||
|
||||
|
Reference in New Issue
Block a user