Skip to content

Commit e3fcc0c

Browse files
committed
subject_name: derive traits for GeneralDnsNameRef
This commit derives `Clone`, `Copy`, `Eq`, `PartialEq`, and `Hash` for `GeneralDnsNameRef`. This type is an enum that contains either a `DnsNameRef` or a `WildcardDnsNameRef`, and both of these types already derive this same list of traits. Adding them to `GeneralDnsNameRef` makes the type easier to work with.
1 parent 10f21c1 commit e3fcc0c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/subject_name/dns_name.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ impl<'a> From<DnsNameRef<'a>> for &'a str {
143143
/// A DNS name that may be either a DNS name identifier presented by a server (which may include
144144
/// wildcards), or a DNS name identifier referenced by a client for matching purposes (wildcards
145145
/// not permitted).
146+
#[derive(Clone, Copy, Eq, PartialEq, Hash)]
146147
pub enum GeneralDnsNameRef<'name> {
147148
/// a reference to a DNS name that may be used for matching purposes.
148149
DnsName(DnsNameRef<'name>),

0 commit comments

Comments
 (0)