From 1e3c075fbf851caa3d685b45c541dc10f4b021a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Mon, 1 Jul 2024 07:31:36 +0200 Subject: [PATCH] parsers: remove now-obsolete JidCodec --- parsers/src/util/text_node_codecs.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/parsers/src/util/text_node_codecs.rs b/parsers/src/util/text_node_codecs.rs index 0ceee390..cabdae3b 100644 --- a/parsers/src/util/text_node_codecs.rs +++ b/parsers/src/util/text_node_codecs.rs @@ -5,8 +5,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use base64::{engine::general_purpose::STANDARD as Base64Engine, Engine}; -use jid::Jid; -use std::str::FromStr; use xso::error::Error; /// A trait for codecs that can decode and encode text nodes. @@ -174,21 +172,6 @@ impl Codec for ColonSeparatedHex { } } -/// Codec for a JID. -pub struct JidCodec; - -impl Codec for JidCodec { - type Decoded = Jid; - - fn decode(s: &str) -> Result { - Jid::from_str(s).map_err(Error::text_parse_error) - } - - fn encode(jid: &Jid) -> Option { - Some(jid.to_string()) - } -} - #[cfg(test)] mod tests { use super::*;