Remove some dead code

This commit is contained in:
Dirkjan Ochtman 2024-05-22 23:11:12 +02:00
parent 209a8503a6
commit 0d806303dd
1 changed files with 1 additions and 21 deletions

View File

@ -1,6 +1,6 @@
//! Types for EPP responses
use std::fmt::{self, Debug};
use std::fmt::Debug;
use chrono::{DateTime, Utc};
use instant_xml::{FromXml, Kind};
@ -195,26 +195,6 @@ impl<'xml> FromXml<'xml> for ResultCode {
const KIND: instant_xml::Kind = Kind::Scalar;
}
struct ResultCodeVisitor;
impl<'de> serde::de::Visitor<'de> for ResultCodeVisitor {
type Value = ResultCode;
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
formatter.write_str("a valid EPP result code")
}
fn visit_u16<E>(self, v: u16) -> Result<Self::Value, E>
where
E: serde::de::Error,
{
use serde::de::Unexpected;
ResultCode::from_u16(v).ok_or_else(|| {
E::invalid_value(Unexpected::Unsigned(v as u64), &"unexpected result code")
})
}
}
/// Type corresponding to the `<trID>` tag in an EPP response XML
#[derive(Debug, Eq, FromXml, PartialEq)]
#[xml(rename = "trID", ns(EPP_XMLNS))]