From 4701f6bb69a547dbd41c36555fdf53f3455f94ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Wed, 7 Jun 2023 17:23:40 +0200 Subject: [PATCH] jid: Rename Error::IcuError into Error::Stringprep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoir the "Error Error" pattern, and also use Stringprep instead of ICU Signed-off-by: Maxime “pep” Buquet --- jid/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jid/src/lib.rs b/jid/src/lib.rs index 3fc389da..35df53d2 100644 --- a/jid/src/lib.rs +++ b/jid/src/lib.rs @@ -44,13 +44,13 @@ pub enum JidParseError { #[cfg(feature = "icu")] /// Happens when the JID is invalid according to stringprep. TODO: make errors /// meaningful. - IcuError(icu::Error), + Stringprep(icu::Error), } #[cfg(feature = "icu")] impl From for JidParseError { fn from(e: icu::Error) -> JidParseError { - JidParseError::IcuError(e) + JidParseError::Stringprep(e) } } @@ -67,7 +67,7 @@ impl fmt::Display for JidParseError { JidParseError::EmptyNode => "nodepart empty despite the presence of a @", JidParseError::EmptyResource => "resource empty despite the presence of a /", #[cfg(feature = "icu")] - JidParseError::IcuError(_err) => "TODO", + JidParseError::Stringprep(_err) => "TODO", } ) }