From c7adc5f014d4635c8468a863a124ddce4a9fe0e7 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 16 Apr 2023 21:15:12 -0700 Subject: refactor(response): rewrite unnecessary macro to function --- src/modules/cryptocurrency.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/modules/cryptocurrency.rs') diff --git a/src/modules/cryptocurrency.rs b/src/modules/cryptocurrency.rs index 752c251..87f6ca0 100644 --- a/src/modules/cryptocurrency.rs +++ b/src/modules/cryptocurrency.rs @@ -19,7 +19,7 @@ use once_cell::sync::Lazy; use serde::Deserialize; -use crate::{route::track_mount, success}; +use crate::{route::track_mount, response::success}; static REFERRALS: Lazy> = Lazy::new(|| { serde_json::from_str(include_str!( @@ -42,8 +42,8 @@ pub fn module(router: &mut windmark::Router) { "Want to start investing in cryptocurrency? Support me by using one of my \ referral links!", |context| { - success!( - format!( + success( + &format!( "# Referrals\n\n=> /cryptocurrency Home\n=> /stocks Stock Market \ Dashboard\n\nWant to start investing? Support me by using one of \ my referral links!\n\n{}", @@ -55,7 +55,7 @@ pub fn module(router: &mut windmark::Router) { .collect::>() .join("\n") ), - context + &context ) }, ); @@ -65,12 +65,12 @@ pub fn module(router: &mut windmark::Router) { "/cryptocurrency", "Relevant information regarding cryptocurrency investing", |context| { - success!( - format!( + success( + &format!( "# Cryptocurrency\n\n=> /stocks Stock Market Dashboard\n=> \ /cryptocurrency/referrals Referrals", ), - context + &context ) }, ); -- cgit v1.2.3