Remove unnecessary type alias

This commit is contained in:
Dirkjan Ochtman 2021-12-02 14:16:03 +01:00 committed by masalachai
parent 37feb5c2c4
commit 34828032ac
10 changed files with 20 additions and 23 deletions

View File

@ -5,7 +5,7 @@ use epp_client_macros::*;
use super::XMLNS;
use crate::common::{ElementName, NoExtension, StringValue};
use crate::request::{EppExtension, EppRequest};
use crate::response::EppCommandResponse;
use crate::response::ResponseStatus;
use serde::{Deserialize, Serialize};
#[derive(Debug)]
@ -16,7 +16,7 @@ pub struct ContactDelete<E> {
impl<E: EppExtension> EppRequest<E> for ContactDelete<E> {
type Input = ContactDeleteRequest;
type Output = EppCommandResponse;
type Output = ResponseStatus;
fn into_parts(self) -> (Self::Input, Option<E>) {
(self.request, self.extension)

View File

@ -7,7 +7,7 @@ use crate::common::{
ContactAuthInfo, ContactStatus, ElementName, NoExtension, Phone, PostalInfo, StringValue,
};
use crate::request::{EppExtension, EppRequest};
use crate::response::EppCommandResponse;
use crate::response::ResponseStatus;
use serde::{Deserialize, Serialize};
#[derive(Debug)]
@ -18,7 +18,7 @@ pub struct ContactUpdate<E> {
impl<E: EppExtension> EppRequest<E> for ContactUpdate<E> {
type Input = ContactUpdateRequest;
type Output = EppCommandResponse;
type Output = ResponseStatus;
fn into_parts(self) -> (Self::Input, Option<E>) {
(self.request, self.extension)

View File

@ -5,7 +5,7 @@ use epp_client_macros::*;
use super::XMLNS;
use crate::common::{ElementName, NoExtension, StringValue};
use crate::request::{EppExtension, EppRequest};
use crate::response::EppCommandResponse;
use crate::response::ResponseStatus;
use serde::{Deserialize, Serialize};
#[derive(Debug)]
@ -16,7 +16,7 @@ pub struct DomainDelete<E> {
impl<E: EppExtension> EppRequest<E> for DomainDelete<E> {
type Input = DomainDeleteRequest;
type Output = EppCommandResponse;
type Output = ResponseStatus;
fn into_parts(self) -> (Self::Input, Option<E>) {
(self.request, self.extension)

View File

@ -5,7 +5,7 @@ use epp_client_macros::*;
use super::XMLNS;
use crate::common::{DomainAuthInfo, ElementName, NoExtension, Period, StringValue};
use crate::request::{EppExtension, EppRequest};
use crate::response::EppCommandResponse;
use crate::response::ResponseStatus;
use serde::{Deserialize, Serialize};
#[derive(Debug)]
@ -31,7 +31,7 @@ pub struct DomainTransferApprove<E> {
impl<E: EppExtension> EppRequest<E> for DomainTransferApprove<E> {
type Input = DomainTransferReq;
type Output = EppCommandResponse;
type Output = ResponseStatus;
fn into_parts(self) -> (Self::Input, Option<E>) {
(self.request, self.extension)
@ -46,7 +46,7 @@ pub struct DomainTransferReject<E> {
impl<E: EppExtension> EppRequest<E> for DomainTransferReject<E> {
type Input = DomainTransferReq;
type Output = EppCommandResponse;
type Output = ResponseStatus;
fn into_parts(self) -> (Self::Input, Option<E>) {
(self.request, self.extension)
@ -61,7 +61,7 @@ pub struct DomainTransferCancel<E> {
impl<E: EppExtension> EppRequest<E> for DomainTransferCancel<E> {
type Input = DomainTransferReq;
type Output = EppCommandResponse;
type Output = ResponseStatus;
fn into_parts(self) -> (Self::Input, Option<E>) {
(self.request, self.extension)

View File

@ -12,7 +12,7 @@ use crate::{
use super::XMLNS;
use crate::response::EppCommandResponse;
use crate::response::ResponseStatus;
use serde::{Deserialize, Serialize};
#[derive(Debug)]
@ -23,7 +23,7 @@ pub struct DomainUpdate<E> {
impl<E: EppExtension> EppRequest<E> for DomainUpdate<E> {
type Input = DomainUpdateRequest;
type Output = EppCommandResponse;
type Output = ResponseStatus;
fn into_parts(self) -> (Self::Input, Option<E>) {
(self.request, self.extension)

View File

@ -5,7 +5,7 @@ use epp_client_macros::*;
use super::XMLNS;
use crate::common::{ElementName, NoExtension, StringValue};
use crate::request::{EppExtension, EppRequest};
use crate::response::EppCommandResponse;
use crate::response::ResponseStatus;
use serde::{Deserialize, Serialize};
#[derive(Debug)]
@ -16,7 +16,7 @@ pub struct HostDelete<E> {
impl<E: EppExtension> EppRequest<E> for HostDelete<E> {
type Input = HostDeleteRequest;
type Output = EppCommandResponse;
type Output = ResponseStatus;
fn into_parts(self) -> (Self::Input, Option<E>) {
(self.request, self.extension)

View File

@ -5,7 +5,7 @@ use epp_client_macros::*;
use super::XMLNS;
use crate::common::{ElementName, HostAddr, HostStatus, NoExtension, StringValue};
use crate::request::{EppExtension, EppRequest};
use crate::response::EppCommandResponse;
use crate::response::ResponseStatus;
use serde::{Deserialize, Serialize};
#[derive(Debug)]
@ -16,7 +16,7 @@ pub struct HostUpdate<E> {
impl<E: EppExtension> EppRequest<E> for HostUpdate<E> {
type Input = HostUpdateRequest;
type Output = EppCommandResponse;
type Output = ResponseStatus;
fn into_parts(self) -> (Self::Input, Option<E>) {
(self.request, self.extension)

View File

@ -7,7 +7,7 @@ use crate::{
common::{ElementName, NoExtension, Options, ServiceExtension, Services, StringValue},
contact, domain, host,
request::{EppExtension, EppRequest, EPP_LANG, EPP_VERSION},
response::EppCommandResponse,
response::ResponseStatus,
};
#[derive(Debug)]
@ -18,7 +18,7 @@ pub struct Login<E> {
impl<E: EppExtension> EppRequest<E> for Login<E> {
type Input = LoginRequest;
type Output = EppCommandResponse;
type Output = ResponseStatus;
fn into_parts(self) -> (Self::Input, Option<E>) {
(self.request, self.extension)

View File

@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
use crate::{
common::{ElementName, NoExtension},
request::{EppExtension, EppRequest},
response::EppCommandResponse,
response::ResponseStatus,
};
#[derive(Debug)]
@ -17,7 +17,7 @@ pub struct Logout<E> {
impl<E: EppExtension> EppRequest<E> for Logout<E> {
type Input = LogoutRequest;
type Output = EppCommandResponse;
type Output = ResponseStatus;
fn into_parts(self) -> (Self::Input, Option<E>) {
(self.request, self.extension)

View File

@ -6,9 +6,6 @@ use std::fmt::Debug;
use crate::common::{ElementName, Extension, StringValue};
/// A generic EPP Response to an EPP command with a result section, a status code and a message
pub type EppCommandResponse = ResponseStatus;
/// Type corresponding to the <undef> tag an EPP response XML
#[derive(Serialize, Deserialize, Debug, PartialEq)]
pub struct Undef;