···1515// Copyright (C) 2022-2023 Fuwn <contact@fuwn.me>
1616// SPDX-License-Identifier: GPL-3.0-only
17171818-use crate::{context::HookContext, Router};
1818+use crate::context::HookContext;
19192020#[async_trait::async_trait]
2121pub trait AsyncModule: Send + Sync {
2222 /// Called right after the module is attached.
2323- async fn on_attach(&mut self, _: &mut Router) {}
2323+ async fn on_attach(&mut self, _: &mut crate::Router) {}
24242525 /// Called before a route is mounted.
2626 async fn on_pre_route(&mut self, _: HookContext) {}
+2-2
src/module/sync.rs
···1515// Copyright (C) 2022-2023 Fuwn <contact@fuwn.me>
1616// SPDX-License-Identifier: GPL-3.0-only
17171818-use crate::{context::HookContext, Router};
1818+use crate::context::HookContext;
19192020pub trait Module {
2121 /// Called right after the module is attached.
2222- fn on_attach(&mut self, _: &mut Router) {}
2222+ fn on_attach(&mut self, _: &mut crate::Router) {}
23232424 /// Called before a route is mounted.
2525 fn on_pre_route(&mut self, _: HookContext) {}
+1-1
src/router.rs
···359359360360 url = or_error!(
361361 stream,
362362- url::Url::parse(&request.replace("\r\n", "")),
362362+ Url::parse(&request.replace("\r\n", "")),
363363 "59 The server (Windmark) received a bad request: {}"
364364 );
365365