]> git.r.bdr.sh - rbdr/blog/blobdiff - src/command/sync_up.rs
Deal with all lints
[rbdr/blog] / src / command / sync_up.rs
index c44e0b03b375e782ef6aca4dbd664e10f6daa088..b609c34027c0c7f3e92b1514c65bb5290eb88ed6 100644 (file)
@@ -1,6 +1,6 @@
-use std::io::Result;
 use crate::configuration::Configuration;
 use crate::remote::sync_up;
 use crate::configuration::Configuration;
 use crate::remote::sync_up;
+use std::io::Result;
 
 pub struct SyncUp;
 
 
 pub struct SyncUp;
 
@@ -15,16 +15,21 @@ impl super::Command for SyncUp {
         vec![]
     }
 
         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) {
         match sync_up(&configuration.data_directory, &configuration.remote_config) {
-            Ok(_) => {}
+            Ok(()) => {}
             Err(e) => {
                 if command == self.command() {
             Err(e) => {
                 if command == self.command() {
-                    return Err(e)
+                    return Err(e);
                 }
             }
         }
                 }
             }
         }
-        return Ok(())
+        Ok(())
     }
 
     fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {
     }
 
     fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {