]> git.r.bdr.sh - rbdr/blog/blobdiff - src/command/sync_down.rs
Deal with all lints
[rbdr/blog] / src / command / sync_down.rs
index eb8e57afdf0b01c0b9b28cedb76eb0541608e922..f9122d4d8fc0eff6d48964b983777c0b9e4a4c17 100644 (file)
@@ -1,6 +1,6 @@
-use std::io::{Result};
 use crate::configuration::Configuration;
 use crate::remote::sync_down;
 use crate::configuration::Configuration;
 use crate::remote::sync_down;
+use std::io::Result;
 
 pub struct SyncDown;
 
 
 pub struct SyncDown;
 
@@ -15,16 +15,21 @@ impl super::Command for SyncDown {
         vec![]
     }
 
         vec![]
     }
 
-    fn execute(&self, _: Option<&String>, configuration: &Configuration, command: &String) -> Result<()> {
+    fn execute(
+        &self,
+        _: Option<&String>,
+        configuration: &Configuration,
+        command: &str,
+    ) -> Result<()> {
         match sync_down(&configuration.data_directory, &configuration.remote_config) {
         match sync_down(&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>> {
@@ -39,4 +44,3 @@ impl super::Command for SyncDown {
         "\t\t\t\tPulls from the git remote if configured"
     }
 }
         "\t\t\t\tPulls from the git remote if configured"
     }
 }
-