Reduce Error type size by boxing result state
This commit is contained in:
parent
406f63e02e
commit
698bab9b2b
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "epp-client"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
authors = ["Ritesh Chitlangi <ritesh@ayravat.com>"]
|
||||
|
|
|
@ -138,10 +138,10 @@ impl<C: Connector> EppClient<C> {
|
|||
return Ok(rsp.data);
|
||||
}
|
||||
|
||||
let err = crate::error::Error::Command(ResponseStatus {
|
||||
let err = crate::error::Error::Command(Box::new(ResponseStatus {
|
||||
result: rsp.data.result,
|
||||
tr_ids: rsp.data.tr_ids,
|
||||
});
|
||||
}));
|
||||
|
||||
error!(%response, "Failed to deserialize response for transaction: {}", err);
|
||||
Err(err)
|
||||
|
|
|
@ -13,7 +13,7 @@ use crate::response::ResponseStatus;
|
|||
/// Error enum holding the possible error types
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
Command(ResponseStatus),
|
||||
Command(Box<ResponseStatus>),
|
||||
Io(std::io::Error),
|
||||
Timeout,
|
||||
Xml(Box<dyn StdError + Send + Sync>),
|
||||
|
|
Loading…
Reference in New Issue