Allow .or_http_err() to work with anyhow
This commit is contained in:
parent
ff58c664d1
commit
ce35ba123b
@ -114,7 +114,7 @@ pub trait OrHttpErr {
|
||||
|
||||
impl<T, E> OrHttpErr for Result<T, E>
|
||||
where
|
||||
E: std::error::Error + Send + Sync + 'static,
|
||||
E: Into<Box<dyn std::error::Error + Send + Sync + 'static>>,
|
||||
{
|
||||
type Value = T;
|
||||
|
||||
@ -127,7 +127,7 @@ where
|
||||
HttpSnafu {
|
||||
code,
|
||||
context: context.into(),
|
||||
source: Some(Box::new(err) as _),
|
||||
source: err.into(),
|
||||
}
|
||||
.build()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user