Parcourir la source

Get rid of warnings

Samuel W. Flint il y a 5 ans
Parent
commit
4fa0c3b550
2 fichiers modifiés avec 6 ajouts et 3 suppressions
  1. 4 1
      src/main.rs
  2. 2 2
      src/repository.rs

+ 4 - 1
src/main.rs

@@ -71,5 +71,8 @@ fn main() {
         _ => println!("No subcommand."),
     }
 
-    write_configuration_file(config_file, configuration);
+    match write_configuration_file(config_file, configuration) {
+        Err(err) => panic!("Error writing configuration: {}.", err),
+        _ => {}
+    }
 }

+ 2 - 2
src/repository.rs

@@ -70,9 +70,9 @@ impl fmt::Display for Repository {
                self.name,
                self.location,
                self.repo_type,
-               self.disabled);
+               self.disabled)?;
         for (key, value) in &self.options {
-            write!(f, "\t\t{}: {}\n", key, value);
+            write!(f, "\t\t{}: {}\n", key, value)?;
         }
         write!(f, "")
     }