diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/context.rs | 6 | ||||
| -rw-r--r-- | src/context/error.rs | 1 | ||||
| -rw-r--r-- | src/context/hook.rs | 1 | ||||
| -rw-r--r-- | src/context/route.rs | 1 | ||||
| -rw-r--r-- | src/lib.rs | 2 | ||||
| -rw-r--r-- | src/router.rs | 2 |
6 files changed, 9 insertions, 4 deletions
diff --git a/src/context.rs b/src/context.rs index 03c0912..68b83fa 100644 --- a/src/context.rs +++ b/src/context.rs @@ -16,10 +16,12 @@ // Copyright (C) 2022-2022 Fuwn <[email protected]> // SPDX-License-Identifier: GPL-3.0-only -mod hook; +#![allow(clippy::module_name_repetitions)] + mod error; +mod hook; mod route; -pub use hook::HookContext; pub use error::ErrorContext; +pub use hook::HookContext; pub use route::RouteContext; diff --git a/src/context/error.rs b/src/context/error.rs index 3b3fd5e..eb1e00e 100644 --- a/src/context/error.rs +++ b/src/context/error.rs @@ -20,6 +20,7 @@ use openssl::x509::X509; use tokio::net::TcpStream; use url::Url; +#[allow(clippy::module_name_repetitions)] pub struct ErrorContext<'a> { pub tcp: &'a TcpStream, pub url: &'a Url, diff --git a/src/context/hook.rs b/src/context/hook.rs index 00cd9d8..44804fa 100644 --- a/src/context/hook.rs +++ b/src/context/hook.rs @@ -21,6 +21,7 @@ use openssl::x509::X509; use tokio::net::TcpStream; use url::Url; +#[allow(clippy::module_name_repetitions)] pub struct HookContext<'a> { pub tcp: &'a TcpStream, pub url: &'a Url, diff --git a/src/context/route.rs b/src/context/route.rs index beaf45f..61eca0c 100644 --- a/src/context/route.rs +++ b/src/context/route.rs @@ -21,6 +21,7 @@ use openssl::x509::X509; use tokio::net::TcpStream; use url::Url; +#[allow(clippy::module_name_repetitions)] pub struct RouteContext<'a> { pub tcp: &'a TcpStream, pub url: &'a Url, @@ -30,10 +30,10 @@ #![doc = include_str!("../README.md")] #![recursion_limit = "128"] +pub mod context; pub mod handler; pub mod module; pub mod response; -pub mod context; pub mod router; pub mod utilities; diff --git a/src/router.rs b/src/router.rs index c0d7220..bd2eaf9 100644 --- a/src/router.rs +++ b/src/router.rs @@ -29,6 +29,7 @@ use tokio::io::{AsyncReadExt, AsyncWriteExt}; use url::Url; use crate::{ + context::{ErrorContext, HookContext, RouteContext}, handler::{ ErrorResponse, Partial, @@ -38,7 +39,6 @@ use crate::{ }, module::Module, response::Response, - context::{HookContext, ErrorContext, RouteContext}, }; macro_rules! or_error { |