From 9fc83f8d4fa360a2eb9812880e1db0fba6d4bad8 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 30 Mar 2023 20:20:27 -0700 Subject: deps(windmark): bump 0.2.1 -> 0.2.2 --- src/modules/api/sydney.rs | 4 +++- src/modules/blog/module.rs | 7 +++---- src/modules/random.rs | 5 ++--- src/modules/search.rs | 4 ++-- src/modules/stocks.rs | 4 ++-- src/modules/uptime.rs | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/modules') diff --git a/src/modules/api/sydney.rs b/src/modules/api/sydney.rs index f24a4f7..1adc07d 100644 --- a/src/modules/api/sydney.rs +++ b/src/modules/api/sydney.rs @@ -52,7 +52,9 @@ pub fn module(router: &mut windmark::Router) { crate::route::cache(&context, &content); - windmark::Response::SuccessWithMime(content, "text/plain".to_string()) + windmark::Response::success(content) + .with_mime("text/plain") + .clone() }), ); } diff --git a/src/modules/blog/module.rs b/src/modules/blog/module.rs index e2ac456..dbdf7ed 100644 --- a/src/modules/blog/module.rs +++ b/src/modules/blog/module.rs @@ -322,10 +322,9 @@ pub fn module(router: &mut windmark::Router) { &format!("/blog/{}.xml", fixed_blog_name), &format!("Really Simple Syndication for the {} blog", name), Box::new(move |_| { - windmark::Response::SuccessWithMime( - xml.to_string(), - "text/rss+xml".to_string(), - ) + windmark::Response::success(xml.to_string()) + .with_mime("text/rss+xml") + .clone() }), ); } diff --git a/src/modules/random.rs b/src/modules/random.rs index 9320ac6..885782c 100644 --- a/src/modules/random.rs +++ b/src/modules/random.rs @@ -24,14 +24,13 @@ pub fn module(router: &mut windmark::Router) { "/random", "Get redirected to a random route", Box::new(|_| { - windmark::Response::TemporaryRedirect( + windmark::Response::temporary_redirect( (*crate::route::ROUTES.lock().unwrap()) .iter() .collect::>() .choose(&mut rand::thread_rng()) .unwrap() - .0 - .to_string(), + .0, ) }), ); diff --git a/src/modules/search.rs b/src/modules/search.rs index 6ad3898..bf0b7bb 100644 --- a/src/modules/search.rs +++ b/src/modules/search.rs @@ -64,8 +64,8 @@ pub(super) fn module(router: &mut windmark::Router) { if let Some(query) = context.url.query_pairs().next() { if query.0 == "action" && query.1 == "go" { - return windmark::Response::Input( - "What would you like to search for?".to_string(), + return windmark::Response::input( + "What would you like to search for?", ); } diff --git a/src/modules/stocks.rs b/src/modules/stocks.rs index bc07f71..832a1ad 100644 --- a/src/modules/stocks.rs +++ b/src/modules/stocks.rs @@ -169,8 +169,8 @@ pub fn module(router: &mut windmark::Router) { if symbol != "Symbol Search" { if let Some(query) = context.url.query_pairs().next() { if query.0 == "action" && query.1 == "go" { - return windmark::Response::Input( - "Which symbol would you like to explore?".to_string(), + return windmark::Response::input( + "Which symbol would you like to explore?", ); } diff --git a/src/modules/uptime.rs b/src/modules/uptime.rs index 6f33433..9a9e1b5 100644 --- a/src/modules/uptime.rs +++ b/src/modules/uptime.rs @@ -48,7 +48,7 @@ pub fn module(router: &mut windmark::Router) { crate::route::cache(&context, &response); - windmark::Response::Success(response) + windmark::Response::success(response) }), ); } -- cgit v1.2.3