This commit is contained in:
Harald Hoyer 2019-02-03 19:33:26 +01:00
parent 4762a75cfe
commit c9259a3ea3
3 changed files with 39 additions and 7 deletions

View file

@ -1,7 +1,7 @@
# Deref for the ErrorKind
Because ChainError<T> implements Deref to &T, we can also match on `*e` instead of `e.kind()`.
Because ChainError<T> implements Deref to &T, we can also match on `*e` instead of `e.kind()`
or call a function with `&e`
~~~rust
use crate::chainerror::*;
{{#include ../examples/tutorial12.rs:2:}}