From b5c10fa428f43e9c91fb0fa006a9b0c133247f8b Mon Sep 17 00:00:00 2001 From: Michael Bryan Date: Sat, 25 Jan 2020 21:57:42 +0800 Subject: [PATCH] thiserror is still cool --- content/posts/reviewing-unsafe-rust.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/posts/reviewing-unsafe-rust.md b/content/posts/reviewing-unsafe-rust.md index daffca8a..1c3cfa0a 100644 --- a/content/posts/reviewing-unsafe-rust.md +++ b/content/posts/reviewing-unsafe-rust.md @@ -43,7 +43,8 @@ crates from [*@dtolnay*][dtolnay] have helped simplify error handling in Rust a lot. The `thiserror` crate is a procedural macro for automating the implementation of -`std::error::Error` and isn't overly interesting for our purposes. +`std::error::Error` and isn't overly interesting for our purposes (it's still +really cool, just doesn't contain tricky `unsafe` code). On the other hand, the `anyhow` crate presents a custom `Error` type and uses a `unsafe` code under the hood to implement nice things like downcasting and