Parcourir la source

refactor(lib): format code

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Christina Sørensen il y a 2 ans
Parent
commit
44b0561286
1 fichiers modifiés avec 13 ajouts et 7 suppressions
  1. 13 7
      src/lib.rs

+ 13 - 7
src/lib.rs

@@ -1,9 +1,12 @@
 #[macro_use]
 extern crate lazy_static;
-use std::collections::HashMap;
+
 use crate::fs::mounts::MountedFs;
+
 use proc_mounts::MountList;
+use std::collections::HashMap;
 use std::path::PathBuf;
+
 // A lazily initialised static map of all mounted file systems.
 //
 // The map contains a mapping from the mounted directory path to the
@@ -22,15 +25,18 @@ lazy_static! {
             Ok(mount_list) => {
                 let mut m = HashMap::new();
                 mount_list.0.iter().for_each(|mount| {
-                    m.insert(mount.dest.clone(), MountedFs {
-                        dest: mount.dest.to_string_lossy().into_owned(),
-                        fstype: mount.fstype.clone(),
-                        source: mount.source.to_string_lossy().into(),
-                    });
+                    m.insert(
+                        mount.dest.clone(),
+                        MountedFs {
+                            dest: mount.dest.to_string_lossy().into_owned(),
+                            fstype: mount.fstype.clone(),
+                            source: mount.source.to_string_lossy().into(),
+                        },
+                    );
                 });
                 m
             }
-            Err(_) => HashMap::new()
+            Err(_) => HashMap::new(),
         }
         #[cfg(not(target_os = "linux"))]
         HashMap::new()