Laurent Louf 3 years ago
parent
commit
c14c254c6b
2 changed files with 10 additions and 3 deletions
  1. 4 1
      core/src/cache.rs
  2. 6 2
      src/main.rs

+ 4 - 1
core/src/cache.rs

@@ -76,7 +76,10 @@ impl Cache {
 impl Cache {
     fn file_path(&self, file: FileId) -> PathBuf {
         let name = file.to_base16();
-        self.audio_root.join("files").join(&name[0..2]).join(&name[2..])
+        self.audio_root
+            .join("files")
+            .join(&name[0..2])
+            .join(&name[2..])
     }
 
     pub fn file(&self, file: FileId) -> Option<File> {

+ 6 - 2
src/main.rs

@@ -250,11 +250,15 @@ fn setup(args: &[String]) -> Setup {
     let use_audio_cache = !matches.opt_present("disable-audio-cache");
 
     let cache_directory = matches.opt_str("c").unwrap_or(String::from(""));
-    let system_cache_directory = matches.opt_str("system-cache").unwrap_or(String::from(cache_directory.clone()));
+    let system_cache_directory = matches
+        .opt_str("system-cache")
+        .unwrap_or(String::from(cache_directory.clone()));
+
     let cache = Some(Cache::new(
         PathBuf::from(cache_directory),
         PathBuf::from(system_cache_directory),
-        use_audio_cache));
+        use_audio_cache,
+    ));
 
     let initial_volume = matches
         .opt_str("initial-volume")