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
Add params
method to Network
#2172
Conversation
I don't think they are exclusive unless |
What about We definitely shouldn't make |
Putting a lifetime everywhere you had |
Hmm, yeah, that's a very good point. |
Writing `network.params()` is less annoying than `Params::network()`, so this adds it. Making it return a static could also improve performance.
fbc6c8a
to
9282cc4
Compare
Force push only fixes a typo in the commit message. |
9282cc4 looks good to me. I wonder if we should use |
It felt kinda weird to return a reference from |
https://users.rust-lang.org/t/implementing-asref-for-types-not-storing-the-reference/102147 Now that I wrote it I'm very tempted by the boxes&co argument but still interested in other viewpoints. :) |
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.
ACK 9282cc4
FWIW, in my opinion just simple |
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.
ACK 9282cc4
Writing
network.params()
is less annoying thanParams::network()
, so this adds it. Making it return a static could also improve performance.Didn't do
Params
->Network
conversions because of #2173