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/add.rs | |
| parent | d26464d12e41e8d53fca8d0e5f9cc6ac03e48f9a (diff) | |
Commit batch of lints to allow autofix
Diffstat (limited to 'src/command/add.rs')
| -rw-r--r-- | src/command/add.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/command/add.rs b/src/command/add.rs index 02da0fb..d38d077 100644 --- a/src/command/add.rs +++ b/src/command/add.rs @@ -1,12 +1,7 @@ +use super::{generate::Generate, sync_down::SyncDown, sync_up::SyncUp, update::Update}; +use crate::configuration::Configuration; use std::fs::{create_dir_all, remove_dir_all, rename}; use std::io::Result; -use super::{ - generate::Generate, - sync_down::SyncDown, - sync_up::SyncUp, - update::Update -}; -use crate::configuration::Configuration; pub struct Add; @@ -21,7 +16,7 @@ impl super::Command for Add { vec![Box::new(SyncDown::new())] } - fn execute(&self, _: Option<&String>, configuration: &Configuration, _: &String) -> Result<()> { + fn execute(&self, _: Option<&String>, configuration: &Configuration, _: &str) -> Result<()> { create_dir_all(&configuration.posts_directory)?; for i in (0..configuration.max_posts - 1).rev() { let source = configuration.posts_directory.join(i.to_string()); @@ -41,7 +36,7 @@ impl super::Command for Add { vec![ Box::new(Update::new()), Box::new(Generate::new()), - Box::new(SyncUp::new()) + Box::new(SyncUp::new()), ] } |