Skip to content

Add From<DnsName<'a>> for ServerName<'a>#82

Merged
djc merged 2 commits intorustls:mainfrom
stormshield-gt:add_from_variant_for_servername_enum
Jul 1, 2025
Merged

Add From<DnsName<'a>> for ServerName<'a>#82
djc merged 2 commits intorustls:mainfrom
stormshield-gt:add_from_variant_for_servername_enum

Conversation

@stormshield-gt
Copy link
Contributor

When using DnsName with rustls, they are several places where I need the conversion to a ServerName.

This PR adds a From<DnsName<'a>> for ServerName<'a> which IMHO is nicer to use than ServerName::DnsName(..) because we can just do into()

Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

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

Makes sense. Can you add a commit fixing the clippy issues? Just --fix should do the job.

@stormshield-gt
Copy link
Contributor Author

That's done ;)

@djc djc added this pull request to the merge queue Jul 1, 2025
Merged via the queue into rustls:main with commit 235dd93 Jul 1, 2025
16 checks passed
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.

3 participants