From ce35ba123b909eb3c17b1455712e22b5108a17d6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 18 Feb 2023 15:27:36 +1000 Subject: [PATCH] Allow .or_http_err() to work with anyhow --- rslib/src/sync/error.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rslib/src/sync/error.rs b/rslib/src/sync/error.rs index fb7d1bbb1..00a02dff9 100644 --- a/rslib/src/sync/error.rs +++ b/rslib/src/sync/error.rs @@ -114,7 +114,7 @@ pub trait OrHttpErr { impl OrHttpErr for Result where - E: std::error::Error + Send + Sync + 'static, + E: Into>, { type Value = T; @@ -127,7 +127,7 @@ where HttpSnafu { code, context: context.into(), - source: Some(Box::new(err) as _), + source: err.into(), } .build() })