diff options
Diffstat (limited to 'src/command/sync_up.rs')
| -rw-r--r-- | src/command/sync_up.rs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/command/sync_up.rs b/src/command/sync_up.rs index c44e0b0..b609c34 100644 --- a/src/command/sync_up.rs +++ b/src/command/sync_up.rs @@ -1,6 +1,6 @@ -use std::io::Result; use crate::configuration::Configuration; use crate::remote::sync_up; +use std::io::Result; pub struct SyncUp; @@ -15,16 +15,21 @@ impl super::Command for SyncUp { vec![] } - fn execute(&self, _: Option<&String>, configuration: &Configuration, command: &String) -> Result<()> { + fn execute( + &self, + _: Option<&String>, + configuration: &Configuration, + command: &str, + ) -> Result<()> { match sync_up(&configuration.data_directory, &configuration.remote_config) { - Ok(_) => {} + Ok(()) => {} Err(e) => { if command == self.command() { - return Err(e) + return Err(e); } } } - return Ok(()) + Ok(()) } fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> { |