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>
|
impl<T, E> OrHttpErr for Result<T, E>
|
||||||
where
|
where
|
||||||
E: std::error::Error + Send + Sync + 'static,
|
E: Into<Box<dyn std::error::Error + Send + Sync + 'static>>,
|
||||||
{
|
{
|
||||||
type Value = T;
|
type Value = T;
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ where
|
|||||||
HttpSnafu {
|
HttpSnafu {
|
||||||
code,
|
code,
|
||||||
context: context.into(),
|
context: context.into(),
|
||||||
source: Some(Box::new(err) as _),
|
source: err.into(),
|
||||||
}
|
}
|
||||||
.build()
|
.build()
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user