fmt and clippy fix

This commit is contained in:
Ritesh Chitlangi 2021-12-03 01:32:04 +08:00
parent 33f47dbe68
commit 794c4c6a7a
3 changed files with 9 additions and 8 deletions

View File

@ -316,7 +316,7 @@ impl Serialize for Status {
Status::ServerUpdateProhibited => "serverUpdateProhibited", Status::ServerUpdateProhibited => "serverUpdateProhibited",
}; };
serializer.serialize_str(&enum_str) serializer.serialize_str(enum_str)
} }
} }
@ -348,7 +348,7 @@ impl<'de> Deserialize<'de> for ContactStatusWithEnum {
_ => return Err("Status Deserialization Error").map_err(DeError::custom), _ => return Err("Status Deserialization Error").map_err(DeError::custom),
}; };
Ok(ContactStatusWithEnum { status: status }) Ok(ContactStatusWithEnum { status })
} }
} }

View File

@ -4,7 +4,8 @@ use epp_client_macros::*;
use super::XMLNS; use super::XMLNS;
use crate::common::{ use crate::common::{
ContactAuthInfo, ContactStatusWithEnum, ElementName, NoExtension, Phone, PostalInfo, StringValue, ContactAuthInfo, ContactStatusWithEnum, ElementName, NoExtension, Phone, PostalInfo,
StringValue,
}; };
use crate::request::{EppExtension, EppRequest}; use crate::request::{EppExtension, EppRequest};
use crate::response::EppCommandResponse; use crate::response::EppCommandResponse;
@ -36,7 +37,7 @@ impl<E: EppExtension> EppRequest<E> for ContactUpdate<E> {
/// use epp_client::EppClient; /// use epp_client::EppClient;
/// use epp_client::contact::update::ContactUpdate; /// use epp_client::contact::update::ContactUpdate;
/// use epp_client::generate_client_tr_id; /// use epp_client::generate_client_tr_id;
/// use epp_client::common::ContactStatus; /// use epp_client::common::ContactStatusWithExtension;
/// use epp_client::common::NoExtension; /// use epp_client::common::NoExtension;
/// ///
/// #[tokio::main] /// #[tokio::main]
@ -68,8 +69,8 @@ impl<E: EppExtension> EppRequest<E> for ContactUpdate<E> {
/// ); /// );
/// ///
/// let add_statuses = vec![ /// let add_statuses = vec![
/// ContactStatus { /// ContactStatusWithExtension {
/// status: "clientTransferProhibited".to_string() /// status: Status::ClientTransferProhibited,
/// } /// }
/// ]; /// ];
/// ///

View File

@ -8,8 +8,8 @@ mod request {
use crate::common::HostObjList; use crate::common::HostObjList;
use crate::common::NoExtension; use crate::common::NoExtension;
use crate::common::{ use crate::common::{
Address, ContactStatusWithEnum, Status, DomainAuthInfo, DomainContact, DomainStatus, HostAddr, HostAttr, Address, ContactStatusWithEnum, DomainAuthInfo, DomainContact, DomainStatus, HostAddr,
HostStatus, Phone, PostalInfo, HostAttr, HostStatus, Phone, PostalInfo, Status,
}; };
use crate::contact::check::ContactCheck; use crate::contact::check::ContactCheck;
use crate::contact::create::ContactCreate; use crate::contact::create::ContactCreate;