mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 03:05:51 +03:00
[GH-ISSUE #167] Borrow Handles, don't consume them #79
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rushmorem on GitHub (Jul 20, 2017).
Original GitHub issue: https://github.com/hickory-dns/hickory-dns/issues/167
I noticed a number of methods (eg
UdpStream::new) consumetokio_core::reactor::Handleinstead of simply borrowing it since the underlying methods only require references. This results in unnecessary cloning in client code.@bluejekyll commented on GitHub (Jul 20, 2017):
Hmm. Did this change in recent Tokio versions?
I think AsRef as the parameter change would fix this without creating a breaking change.
@rushmorem commented on GitHub (Jul 20, 2017):
As long as I remember, this has always been the case. Methods in Tokio have always borrowed
Handle.@bluejekyll commented on GitHub (Jul 20, 2017):
Huh. I don't know why I would have made that mistake. I'm on a family vacation right now. I might be able to get to this at some point this week. Otherwise a PR is always welcome.
@rushmorem commented on GitHub (Jul 20, 2017):
IMHO it might actually be desirable to make this a breaking change otherwise people might not be aware of it.
Don't worry about it. Please enjoy your vacation. I will work on this and submit a pull request.
@bluejekyll commented on GitHub (Jul 20, 2017):
Yeah. I thought about that. It makes sense, I'll plan on a 0.11 release for this in a little bit in that case.
And thanks for the PR!