From 230dd1877f906708dc487bf5c4d87a8769b680fb Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 5 May 2023 00:31:39 +0000 Subject: refactor: simplify imports --- src/module/asynchronous.rs | 4 ++-- src/module/sync.rs | 4 ++-- src/router.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/module/asynchronous.rs b/src/module/asynchronous.rs index f94a0b6..2459518 100644 --- a/src/module/asynchronous.rs +++ b/src/module/asynchronous.rs @@ -15,12 +15,12 @@ // Copyright (C) 2022-2023 Fuwn // SPDX-License-Identifier: GPL-3.0-only -use crate::{context::HookContext, Router}; +use crate::context::HookContext; #[async_trait::async_trait] pub trait AsyncModule: Send + Sync { /// Called right after the module is attached. - async fn on_attach(&mut self, _: &mut Router) {} + async fn on_attach(&mut self, _: &mut crate::Router) {} /// Called before a route is mounted. async fn on_pre_route(&mut self, _: HookContext) {} diff --git a/src/module/sync.rs b/src/module/sync.rs index 8c181be..4b6de4d 100644 --- a/src/module/sync.rs +++ b/src/module/sync.rs @@ -15,11 +15,11 @@ // Copyright (C) 2022-2023 Fuwn // SPDX-License-Identifier: GPL-3.0-only -use crate::{context::HookContext, Router}; +use crate::context::HookContext; pub trait Module { /// Called right after the module is attached. - fn on_attach(&mut self, _: &mut Router) {} + fn on_attach(&mut self, _: &mut crate::Router) {} /// Called before a route is mounted. fn on_pre_route(&mut self, _: HookContext) {} diff --git a/src/router.rs b/src/router.rs index 554651a..5532182 100644 --- a/src/router.rs +++ b/src/router.rs @@ -359,7 +359,7 @@ impl Router { url = or_error!( stream, - url::Url::parse(&request.replace("\r\n", "")), + Url::parse(&request.replace("\r\n", "")), "59 The server (Windmark) received a bad request: {}" ); -- cgit v1.2.3