Skip to content

Commit d1c9f5b

Browse files
committed
Qualify errors from db.rs as db::Error rather than importing
This makes more sense since it's not the top-level error in the modules that were importing it
1 parent 1d00fed commit d1c9f5b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

payjoin-directory/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use tokio::net::TcpListener;
1515
use tokio::sync::Mutex;
1616
use tracing::{debug, error, info, trace};
1717

18-
use crate::db::{DbPool, Error};
18+
use crate::db::DbPool;
1919

2020
pub const DEFAULT_DIR_PORT: u16 = 8080;
2121
pub const DEFAULT_DB_HOST: &str = "localhost:6379";
@@ -314,17 +314,17 @@ impl From<hyper::http::Error> for HandlerError {
314314
}
315315

316316
fn 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
}

0 commit comments

Comments
 (0)