diff --git a/src/axum.rs b/src/axum.rs index e11e271..e0c55c0 100644 --- a/src/axum.rs +++ b/src/axum.rs @@ -1,4 +1,7 @@ -use crate::{types::Response, HandlerArgs}; +use crate::{ + types::{Request, Response}, + HandlerArgs, +}; use axum::{extract::FromRequest, response::IntoResponse}; use bytes::Bytes; use std::{future::Future, pin::Pin}; @@ -15,7 +18,7 @@ where return Box::::from(Response::parse_error()).into_response(); }; - let Ok(req) = crate::types::Request::try_from(bytes) else { + let Ok(req) = Request::try_from(bytes) else { return Box::::from(Response::parse_error()).into_response(); }; diff --git a/src/routes/ctx.rs b/src/routes/ctx.rs index 88cff3c..c1df1aa 100644 --- a/src/routes/ctx.rs +++ b/src/routes/ctx.rs @@ -1,9 +1,8 @@ +use crate::{types::Request, RpcSend}; use serde_json::value::RawValue; use tokio::sync::mpsc; use tracing::error; -use crate::RpcSend; - /// Errors that can occur when sending notifications. #[derive(thiserror::Error, Debug)] pub enum NotifyError { @@ -82,5 +81,5 @@ pub struct HandlerArgs { /// The handler context. pub ctx: HandlerCtx, /// The JSON-RPC request. - pub req: crate::types::Request, + pub req: Request, }