| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #642 +/- ##
==========================================
- Coverage 40.81% 40.78% -0.03%
==========================================
Files 76 77 +1
Lines 17345 17383 +38
Branches 4474 4484 +10
==========================================
+ Hits 7079 7090 +11
- Misses 8366 8396 +30
+ Partials 1900 1897 -3
Continue to review full report at Codecov.
|
Sorry, something went wrong.
| trace!("invoke __call__ for: {:?}", payload); | ||
| self.call_method(&func_ref, "__call__", args) | ||
| } | ||
| if let Some(PyFunction { |
There was a problem hiding this comment.
Why is a match statement no option here? I feel match is better than if statements with returns.
Sorry, something went wrong.
There was a problem hiding this comment.
I can get rid of the explicit returns, but a match won't work here because each payload call is generic over the specific payload type.
(I do have some ideas on how to make this kind of thing cleaner and more efficient, but they're not fully baked yet.)
Sorry, something went wrong.
There was a problem hiding this comment.
I think we could use a macro, something like match_payload!, which would look like:
let match_res = match_payload!(pyobjref, {
objint::PyInt(int) => do_thing(int.value),
objfloat::PyFloat(objfloat::PyFloat { value }) => do_float_thing(value),
});
Sorry, something went wrong.
|
I had some minor comment, but it looks good! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Getting so close now!