From 9581ce45cb10e3c865192484d401fc0837b1e433 Mon Sep 17 00:00:00 2001 From: Koen Bolhuis Date: Wed, 13 Jan 2021 14:28:28 +0100 Subject: [PATCH] Box ureq::Error because it is 1000+ bytes --- src/error.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/error.rs b/src/error.rs index 45a3c9f..d47c103 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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), } #[derive(Debug, Deserialize)] @@ -50,7 +50,7 @@ impl From 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)), } } }