-
Notifications
You must be signed in to change notification settings - Fork 184
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
feat(iroh-net): Expose DNS resolver #2262
Conversation
1d6abdc
to
f1b0418
Compare
nameserver: SocketAddr, | ||
node_origin: &str, | ||
pkarr_relay: &Url, | ||
relay_map: &RelayMap, |
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.
why change this to a reference if it then immediately clones it? by keeping it as owned it's more obvious to the caller what happens to it and they get to do the clone, if needed, explicitly.
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.
oh, i guess this is just a test util. but still, i find that an odd pattern even if it is for tests. if you really like the convenience of calling it with borrowed data maybe using a generic with Clone
or ToOwned
is better.
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 agree in general but thought for a test only util it's ok and makes writing tests a bit simpler IMO. But no strong opinion, can also change back to take by value.
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.
yeah, i approved anyway as i noticed it's a test. up to you
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.
very nice!
Description
iroh
Change checklist