File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ use tokio::net::TcpListener;
1515use tokio:: sync:: Mutex ;
1616use tracing:: { debug, error, info, trace} ;
1717
18- use crate :: db:: { DbPool , Error } ;
18+ use crate :: db:: DbPool ;
1919
2020pub const DEFAULT_DIR_PORT : u16 = 8080 ;
2121pub const DEFAULT_DB_HOST : & str = "localhost:6379" ;
@@ -314,17 +314,17 @@ impl From<hyper::http::Error> for HandlerError {
314314}
315315
316316fn handle_peek (
317- result : Result < Vec < u8 > , Error > ,
317+ result : Result < Vec < u8 > , db :: Error > ,
318318 timeout_response : Response < BoxBody < Bytes , hyper:: Error > > ,
319319) -> Result < Response < BoxBody < Bytes , hyper:: Error > > , HandlerError > {
320320 match result {
321321 Ok ( buffered_req) => Ok ( Response :: new ( full ( buffered_req) ) ) ,
322322 Err ( e) => match e {
323- Error :: Redis ( re) => {
323+ db :: Error :: Redis ( re) => {
324324 error ! ( "Redis error: {}" , re) ;
325325 Err ( HandlerError :: InternalServerError ( anyhow:: Error :: msg ( "Internal server error" ) ) )
326326 }
327- Error :: Timeout ( _) => Ok ( timeout_response) ,
327+ db :: Error :: Timeout ( _) => Ok ( timeout_response) ,
328328 } ,
329329 }
330330}
You can’t perform that action at this time.
0 commit comments