mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-04-24 08:32:57 +02:00
Update error-contexts.md (#251)
* Update error-contexts.md Adding more speaker notes about `anyhow`. * Add markup Co-authored-by: Martin Geisler <martin@geisler.net>
This commit is contained in:
parent
912f592199
commit
617f4e2bb7
@ -36,3 +36,12 @@ fn main() {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<details>
|
||||
|
||||
* `anyhow::Result<T>` is generic and it can hold any `Error` implementation without changing the type signature.
|
||||
* Actual error type inside of it can be extracted for examination if necessary.
|
||||
* Functionality provided by `anyhow::Result<T>` may be familiar to Go developers, as it provides similar usage patterns and ergonomics
|
||||
of `(T, error)` from Go.
|
||||
|
||||
</details>
|
||||
|
Loading…
x
Reference in New Issue
Block a user