Skip to content

Conversation

0x676e67
Copy link
Owner

No description provided.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the DNS resolver module by introducing a more ergonomic trait-based API (IntoResolve) that enables easier conversion of various resolver types into the expected Arc<dyn Resolve> format. The changes simplify the user experience when working with DNS resolvers by providing automatic conversions and removing the need for explicit Arc wrapping or error handling for domain name parsing.

  • Introduced IntoResolve trait for ergonomic conversion of resolver types to Arc<dyn Resolve>
  • Replaced fallible FromStr implementation for Name with infallible From<&str> implementation
  • Updated API signatures to accept generic resolver types through the new trait

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/core/client/connect/dns/resolve.rs Removes error-based domain parsing, adds IntoResolve trait with implementations, replaces FromStr with From<&str> for Name
src/core/client/connect/dns/mod.rs Exports the new IntoResolve trait for public API usage
src/core/client/connect/dns/gai.rs Updates test code to use the new From<&str> implementation instead of FromStr
src/client/http/mod.rs Updates dns_resolver method to use generic IntoResolve parameter and improves comment consistency

@0x676e67 0x676e67 marked this pull request as ready for review August 12, 2025 01:13
@0x676e67 0x676e67 merged commit 9e3f974 into main Aug 12, 2025
6 checks passed
@0x676e67 0x676e67 deleted the feat branch August 12, 2025 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant