-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(iroh-net): small improvements to dns code (#2301)
## Description - Move helper methods to a trait extension to make them more ergonomic to use. - Avoid temporary allocations via `collect` in dns lookups. - Avoid double iterations on lookup results in the relay. - Remove unnecessary `TryParseIp` bound on lookup functions. - Modify comments about ipv4/ipv6 lookup to clarify why we avoid the lookup strategy that would naturally fit this use. ## Breaking Changes - `iroh_net::dns::lookup_ipv4_ipv6` is removed in favor of `iroh_net::dns::ResolverExt::lookup_ipv4_ipv6` ## Notes & open questions Was `iroh_net::dns::lookup_ipv4_ipv6` meant to be part of the public api? I don't really see why. ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [ ] ~Tests if relevant.~ - [x] All breaking changes documented.
- Loading branch information
1 parent
491012c
commit b93dd34
Showing
3 changed files
with
109 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters