aboutsummaryrefslogtreecommitdiff
path: root/src/modules/router/module.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/router/module.rs')
-rw-r--r--src/modules/router/module.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/router/module.rs b/src/modules/router/module.rs
index 34d20db..cd7c862 100644
--- a/src/modules/router/module.rs
+++ b/src/modules/router/module.rs
@@ -19,25 +19,25 @@
use windmark::context::HookContext;
pub fn module(router: &mut windmark::Router) {
- router.set_pre_route_callback(move |context: HookContext<'_>| {
+ router.set_pre_route_callback(move |context: HookContext| {
info!(
"accepted connection from {} to {}",
- context.tcp.peer_addr().unwrap().ip(),
+ context.peer_address.unwrap().ip(),
context.url.to_string(),
);
super::ticker::module(&context);
});
router.set_post_route_callback({
- |context: HookContext<'_>, response: &mut windmark::Response| {
+ |context: HookContext, response: &mut windmark::Response| {
info!(
"closed connection from {} to {}",
- context.tcp.peer_addr().unwrap().ip(),
+ context.peer_address.unwrap().ip(),
context.url.to_string(),
);
if let Some(language) =
- windmark::utilities::queries_from_url(context.url).get("translate")
+ windmark::utilities::queries_from_url(&context.url).get("translate")
{
if super::translate::module(&context, response, language).is_err() {
response.content = format!(