-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
migrate from failure to anyhow + thiserror #127
Conversation
Codecov Report
@@ Coverage Diff @@
## master #127 +/- ##
==========================================
- Coverage 68.60% 68.57% -0.03%
==========================================
Files 65 65
Lines 5902 5906 +4
==========================================
+ Hits 4049 4050 +1
- Misses 1853 1856 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a pretty minor comment on #80 that would change this, but this is super straightforward. Having using anyhow in another project, this totally is what I/we expected and doesn't mean a ton of changes.
c66cd6d
to
ec524ec
Compare
I do ❤️ ocd @drunkirishcoder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
amazingly thorough. I also agree w/ not needing the type packet processing/parsing error types, and just using the anyhow! macro.
display = "Struct size {} exceeds the remaining buffer length {}.", | ||
_0, _1 | ||
)] | ||
#[error("Struct size {0} exceeds the remaining buffer length {1}.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is nicer.
Description
Fixes RUSTSEC-2020-0036.
There are a few options but seems like
anyhow
is the most active and it's a pretty easy drop in replacement for error propagation. The derive macro is replaced withthiserror
. Together that covers all the ways we were usingfailure
crate.Type of change
maintenance chore