mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 15:17: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>
|
||||
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 a new issue