diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-05 00:38:55 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-05 00:38:55 +0100 |
| commit | d7fef30ac3f539975ef9edbba8e0af4a4e9ff3de (patch) | |
| tree | 1e71dd131261a8f7a13d86d4dddd7d421e6a09f4 /src/command/status/blog_status.rs | |
| parent | d26464d12e41e8d53fca8d0e5f9cc6ac03e48f9a (diff) | |
Commit batch of lints to allow autofix
Diffstat (limited to 'src/command/status/blog_status.rs')
| -rw-r--r-- | src/command/status/blog_status.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command/status/blog_status.rs b/src/command/status/blog_status.rs index df5256e..48f608a 100644 --- a/src/command/status/blog_status.rs +++ b/src/command/status/blog_status.rs @@ -1,6 +1,6 @@ +use crate::configuration::Configuration; use std::fs::read_dir; use std::path::PathBuf; -use crate::configuration::Configuration; pub fn status(configuration: &Configuration) -> String { let mut status_message = String::new(); @@ -9,16 +9,16 @@ pub fn status(configuration: &Configuration) -> String { // Main Configuration Locations let blog_count = count_entries(&configuration.posts_directory); - status_message.push_str(&format!("Number of posts in blog: {}\n", blog_count)); + status_message.push_str(&format!("Number of posts in blog: {blog_count}\n")); let archive_count = count_entries(&configuration.archive_directory); - status_message.push_str(&format!("Number of posts in archive: {}\n", archive_count)); + status_message.push_str(&format!("Number of posts in archive: {archive_count}\n")); status_message } fn count_entries(path: &PathBuf) -> String { match read_dir(path) { Ok(entries) => entries.filter_map(Result::ok).count().to_string(), - Err(_) => "0".to_string() + Err(_) => "0".to_string(), } } |