From 9312dd49709a3dd0a868df7a979e59abd4feaff0 Mon Sep 17 00:00:00 2001 From: Vaughn Dice Date: Thu, 2 Feb 2023 14:55:01 -0700 Subject: [PATCH] fix(src): address clippy errors Signed-off-by: Vaughn Dice --- src/content.rs | 10 +++++----- src/response.rs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/content.rs b/src/content.rs index 0cdaf71..89f1feb 100644 --- a/src/content.rs +++ b/src/content.rs @@ -135,7 +135,7 @@ pub fn all_pages( match cache_file { Ok(f) => { let mut f = BufWriter::new(f); - println!("Writing string is {}", cache_expiry_time); + println!("Writing string is {cache_expiry_time}"); println!( "Writing Expiry Time is {:#?}", DateTime::parse_from_rfc3339(&cache_expiry_time) @@ -143,8 +143,8 @@ pub fn all_pages( // Cache_contents is stored in a file in the following manner // Cache expiry timer on the 1st line // The rest of the file contains the cache contents - writeln!(f, "{}", cache_expiry_time)?; - write!(f, "{}", cache_data)?; + writeln!(f, "{cache_expiry_time}")?; + write!(f, "{cache_data}")?; } _ => { eprintln!("Cannot create Cache file"); @@ -175,7 +175,7 @@ pub fn all_pages_load(dir: PathBuf, show_unpublished: bool) -> anyhow::Result Result { - eprintln!("Not found: {}", route); + eprintln!("Not found: {route}"); let bldr = Builder::new() .status(http::StatusCode::NOT_FOUND) .header(http::header::CONTENT_TYPE, "text/html; charset=utf-8"); @@ -48,7 +48,7 @@ pub fn send_result( content_encoding: Option<&HeaderValue>, status: Option, ) -> Result { - eprintln!("Responded: {}", route); + eprintln!("Responded: {route}"); let mut bldr = Builder::new().header(http::header::CONTENT_TYPE, content_type); if let Some(status) = status { bldr = bldr.status(status);