-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wicketd] replace snafu with thiserror (#4950)
This is currently the only use of snafu in omicron (outside of transitive deps), and I figure it is simple enough that we can replace it with thiserror, reducing use of a direct dependency. This was the first time I'd encountered snafu so I read a bit about it. As far as I understand, the main benefit of snafu is that it pushes you heavily towards an error-per-module pattern. However, thiserror does permit that pattern as well, and in practice it is only a little more verbose than snafu to do right (`map_err` vs `context`, though `snafu` introduces new types that aren't in the source code like `IoSnafu` and `ParseSnafu`).
- Loading branch information
1 parent
e72625c
commit 5208d21
Showing
4 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters