mirror of
https://github.com/haraldh/chainerror.git
synced 2024-10-05 12:15:10 +02:00
13 lines
282 B
Markdown
13 lines
282 B
Markdown
# Deref for the ErrorKind
|
|
|
|
Because ChainError<T> implements Deref to &T, we can also match on `*e` instead of `e.kind()`.
|
|
|
|
~~~rust
|
|
use crate::chainerror::*;
|
|
{{#include ../examples/tutorial12.rs:2:}}
|
|
# #[allow(dead_code)]
|
|
# mod chainerror {
|
|
{{#includecomment ../src/lib.rs}}
|
|
# }
|
|
~~~
|