diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-18 13:22:04 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-18 13:22:04 +0200 |
| commit | 8d11eb64efa67f1d7a6902300fdffd2c7c08df6c (patch) | |
| tree | 119de904ee30468726d7f58680e1ba47c5dd267e /src/command/status/blog_status.rs | |
| parent | 5d8b65a9a5742e5db705cf4c8164138eca20c355 (diff) | |
Apply clippy and formatting
Diffstat (limited to 'src/command/status/blog_status.rs')
| -rw-r--r-- | src/command/status/blog_status.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/command/status/blog_status.rs b/src/command/status/blog_status.rs index 32881d0..cae101a 100644 --- a/src/command/status/blog_status.rs +++ b/src/command/status/blog_status.rs @@ -1,7 +1,7 @@ use crate::configuration::Configuration; use std::fmt::Write; use std::fs::read_dir; -use std::io::{Error, ErrorKind, Result}; +use std::io::{Error, Result}; use std::path::PathBuf; pub fn status(configuration: &Configuration) -> Result<String> { @@ -12,14 +12,14 @@ pub fn status(configuration: &Configuration) -> Result<String> { // Main Configuration Locations let blog_count = count_entries(&configuration.posts_directory); writeln!(&mut status_message, "Number of posts in blog: {blog_count}") - .map_err(|_| Error::new(ErrorKind::Other, "Unable to write status"))?; + .map_err(|_| Error::other("Unable to write status"))?; let archive_count = count_entries(&configuration.archive_directory); writeln!( &mut status_message, "Number of posts in archive: {archive_count}" ) - .map_err(|_| Error::new(ErrorKind::Other, "Unable to write status"))?; + .map_err(|_| Error::other("Unable to write status"))?; Ok(status_message) } |