New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error-stack
: clarify documentation of HookContext
#1987
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1987 +/- ##
==========================================
- Coverage 57.59% 57.06% -0.54%
==========================================
Files 265 265
Lines 18940 19118 +178
Branches 421 421
==========================================
Hits 10909 10909
- Misses 8026 8204 +178
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Thanks, @indietyp, this is much better (and also does unbreak SemVer for this struct) 🎉
I took the liberty of cleaning |
Sorry, @TimDiekmann, I need another review D: I just realized that I can remove all cfg guards in the |
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 think the last commit was a good idea 😄
/trunk merge |
🚫 This pull request has been removed from the merge queue (details). |
😎 Merged successfully (details). |
🌟 What is the purpose of this PR?
#1693 separated
fmt::HookContext
intohook::HookContext
andfmt::HookContext
, so that it can be used in #1558. While working, the problem is that documentation doesn't render correctly becausehook::HookContext
is private in public. Therefore unreachable rustdoc is unable to navigate to the type, and the documentation is incomplete.This PR moves to a macro-based approach to enable better documentation. Instead of using an unreachable public type, we have a macro that implements the necessary common functions. This is by far not ideal, but I found this to be the best way without compromising #1558 or future hooks.