mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-23 04:52:28 +00:00
use anyhow
This commit is contained in:
parent
6470bd59ef
commit
0729d5b8ed
2 changed files with 4 additions and 3 deletions
|
@ -5,6 +5,7 @@ use futures_util::{
|
|||
future::{FutureExt, TryFutureExt}
|
||||
};
|
||||
use gotham::{
|
||||
anyhow,
|
||||
handler::HandlerFuture,
|
||||
hyper::header::{HeaderMap, AUTHORIZATION},
|
||||
middleware::{Middleware, NewMiddleware},
|
||||
|
@ -280,7 +281,7 @@ where
|
|||
{
|
||||
type Instance = Self;
|
||||
|
||||
fn new_middleware(&self) -> Result<Self::Instance, std::io::Error> {
|
||||
fn new_middleware(&self) -> anyhow::Result<Self> {
|
||||
let c: Self = self.clone();
|
||||
Ok(c)
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use super::SECURITY_NAME;
|
||||
use futures_util::{future, future::FutureExt};
|
||||
use gotham::{
|
||||
error::Result,
|
||||
anyhow,
|
||||
handler::{Handler, HandlerFuture, NewHandler},
|
||||
helpers::http::response::create_response,
|
||||
state::State
|
||||
|
@ -28,7 +28,7 @@ impl OpenapiHandler {
|
|||
impl NewHandler for OpenapiHandler {
|
||||
type Instance = Self;
|
||||
|
||||
fn new_handler(&self) -> Result<Self> {
|
||||
fn new_handler(&self) -> anyhow::Result<Self> {
|
||||
Ok(self.clone())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue