chainerror/booksrc/tutorial12.md
Harald Hoyer 82257c881a
docs: use new names
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
2023-07-28 16:22:00 +02:00

291 B

Deref for the ErrorKind

Because chainerror::Error implements Deref to &T, we can also match on *e instead of e.kind() or call a function with &e

{{#include ../examples/tutorial12.rs}}
# #[allow(dead_code)]
# mod chainerror {
{{#rustdoc_include ../src/lib.rs:-1}}
# }