aboutsummaryrefslogtreecommitdiff
path: root/src/modules/blog/module.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-04-16 21:15:12 -0700
committerFuwn <[email protected]>2023-04-16 21:15:12 -0700
commitc7adc5f014d4635c8468a863a124ddce4a9fe0e7 (patch)
tree2f5a8aafdbf3fa0712d01ecb95ccd10eb691fd10 /src/modules/blog/module.rs
parentfix(amenadiel): modules macro unwrap on none (diff)
downloadlocus-c7adc5f014d4635c8468a863a124ddce4a9fe0e7.tar.xz
locus-c7adc5f014d4635c8468a863a124ddce4a9fe0e7.zip
refactor(response): rewrite unnecessary macro to function
Diffstat (limited to 'src/modules/blog/module.rs')
-rw-r--r--src/modules/blog/module.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/blog/module.rs b/src/modules/blog/module.rs
index a5cbcba..433a1f5 100644
--- a/src/modules/blog/module.rs
+++ b/src/modules/blog/module.rs
@@ -25,7 +25,7 @@ use std::{
use crate::{
modules::blog::config::Blog,
route::track_mount,
- success,
+ response::success,
xml::{Item as XmlItem, Writer as XmlWriter},
};
@@ -101,7 +101,7 @@ pub fn module(router: &mut windmark::Router) {
let blog_clone = blogs.clone();
track_mount(router, "/blog", "Fuwn's blogs", move |context| {
- success!(
+ success(
&format!(
"# Blogs ({})\n\n{}",
blog_clone.len(),
@@ -137,7 +137,7 @@ pub fn module(router: &mut windmark::Router) {
.collect::<Vec<_>>()
.join("\n")
),
- context
+ &context
)
});
@@ -182,7 +182,7 @@ pub fn module(router: &mut windmark::Router) {
move |context| {
let fixed_blog_name = fixed_blog_name_clone.clone();
- success!(
+ success(
&format!(
"# {} ({})\n\n{}\n\n{}\n\n## Really Simple Syndication\n\nAccess \
{0}'s RSS feed\n\n=> {} here!",
@@ -229,7 +229,7 @@ pub fn module(router: &mut windmark::Router) {
.join("\n"),
format_args!("/blog/{}.xml", fixed_blog_name),
),
- context
+ &context
)
},
);
@@ -290,7 +290,7 @@ pub fn module(router: &mut windmark::Router) {
}
),
move |context| {
- success!(format!("{}\n{}", header.0, contents,), context)
+ success(&format!("{}\n{}", header.0, contents,), &context)
},
);
}