-
Notifications
You must be signed in to change notification settings - Fork 29
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
More explicit struct initialization #87
Conversation
What do you think @vlmutolo? |
Codecov Report
@@ Coverage Diff @@
## master #87 +/- ##
==========================================
+ Coverage 96.2% 96.49% +0.28%
==========================================
Files 36 36
Lines 5585 6297 +712
==========================================
+ Hits 5373 6076 +703
- Misses 212 221 +9
Continue to review full report at Codecov.
|
I think that the explicit version is much better. It definitely helps to immediately what the type of the newly-created object is. The only question I have is whether it would be better to rename |
I agree this seems to be the way in Rust, though from what I have seen, using Edit: I couldn't find any information in the guidelines.
This is great, we'll rename |
Hey, quick turnaround! Nice. I think that this will be more intuitive for new users of the library. Less cognitive load wondering if |
Unfortunately it seems to be a little more trouble than this. I didn't realize it, but clippy warns against Here's the CI output: https://travis-ci.org/brycx/orion/jobs/580625988 |
Taking into account that the |
Currently, for a given streaming context
Ctx
in modulefoo
we have:This PR changes this to be more explicit: