aboutsummaryrefslogtreecommitdiff
path: root/src/command/status/blog_status.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/status/blog_status.rs')
-rw-r--r--src/command/status/blog_status.rs6
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)
}