Skip to content

Commit d8c05e1

Browse files
committed
Move InvalidDnsNameError definition down below usage
1 parent 006f878 commit d8c05e1

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/subject_name/dns_name.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,6 @@ impl AsRef<str> for DnsNameRef<'_> {
7272
}
7373
}
7474

75-
/// An error indicating that a `DnsNameRef` could not built because the input
76-
/// is not a syntactically-valid DNS Name.
77-
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
78-
pub struct InvalidDnsNameError;
79-
80-
impl core::fmt::Display for InvalidDnsNameError {
81-
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
82-
write!(f, "{:?}", self)
83-
}
84-
}
85-
86-
#[cfg(feature = "std")]
87-
impl ::std::error::Error for InvalidDnsNameError {}
88-
8975
impl<'a> DnsNameRef<'a> {
9076
/// Constructs a `DnsNameRef` from the given input if the input is a
9177
/// syntactically-valid DNS name.
@@ -228,6 +214,20 @@ impl AsRef<str> for WildcardDnsNameRef<'_> {
228214
}
229215
}
230216

217+
/// An error indicating that a `DnsNameRef` could not built because the input
218+
/// is not a syntactically-valid DNS Name.
219+
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
220+
pub struct InvalidDnsNameError;
221+
222+
impl core::fmt::Display for InvalidDnsNameError {
223+
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
224+
write!(f, "{:?}", self)
225+
}
226+
}
227+
228+
#[cfg(feature = "std")]
229+
impl ::std::error::Error for InvalidDnsNameError {}
230+
231231
pub(super) fn presented_id_matches_reference_id(
232232
presented_dns_id: untrusted::Input,
233233
reference_dns_id: untrusted::Input,

0 commit comments

Comments
 (0)