Box ureq::Error because it is 1000+ bytes

This commit is contained in:
Koen Bolhuis 2021-01-13 14:28:28 +01:00
parent 6c0eff415e
commit 9581ce45cb
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ pub enum Error {
/// There was some other HTTP error while interacting with the API.
#[error("HTTP error")]
Http(#[source] ureq::Error),
Http(#[source] Box<ureq::Error>),
}
#[derive(Debug, Deserialize)]
@ -50,7 +50,7 @@ impl From<ureq::Error> for Error {
Ok(api_error) => api_error.into(),
Err(err) => Error::ResponseJson(err),
},
ureq::Error::Transport(_) => Error::Http(error),
ureq::Error::Transport(_) => Error::Http(Box::new(error)),
}
}
}