-
Notifications
You must be signed in to change notification settings - Fork 79
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
Traits and impls for adding context and exit codes to results. #589
Conversation
@Kubuxu you had questions about this in another PR. I believe these methods are still cheap because in implementation they still defer work through a closure. But with nice clean syntax. The |
100% agreed that the pattern is nicer, I just noticed that the closure pattern wasn't used in many places where |
c7cabb0
to
be262cc
Compare
I have to say this is a lot nicer. |
@Stebalien is there any simple way for us to get a lint for cases like ones I've pointed out above? In 2min of searching I found this: https://github.com/trailofbits/dylint but introducing it would be quite a hassle just for this. |
I've never seen one, unfortunately. |
Co-authored-by: dignifiedquire <me@dignifiedquire.com>
847b390
to
b835a0f
Compare
Codecov Report
@@ Coverage Diff @@
## master #589 +/- ##
==========================================
+ Coverage 83.92% 84.48% +0.55%
==========================================
Files 88 88
Lines 18155 18081 -74
==========================================
+ Hits 15237 15275 +38
+ Misses 2918 2806 -112
|
Co-authored-by: dignifiedquire <me@dignifiedquire.com>
Co-authored-by: dignifiedquire <me@dignifiedquire.com>
…oin-project#589) Co-authored-by: dignifiedquire <me@dignifiedquire.com>
…oin-project#589) Co-authored-by: dignifiedquire <me@dignifiedquire.com>
This is a backport from the
decouple-fil+
branch. The new traits and conversion methods are extracted from @dignifiedquire's work in #214. We can have them now without necessarily following through all the work to convert everything over. I've converted a couple of the simpler actors to demonstrate, and we should use the new traits for new code.