mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 23:27:12 -05:00
Allow .or_http_err() to work with anyhow
This commit is contained in:
parent
ff58c664d1
commit
ce35ba123b
1 changed files with 2 additions and 2 deletions
|
|
@ -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 a new issue