diff options
author | Canop <cano.petrole@gmail.com> | 2021-06-02 13:45:12 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2021-06-02 13:45:12 +0200 |
commit | 77f40f74c38392a5213f99006138d74772ac5c6c (patch) | |
tree | 145732e2e45e0dd3bf17e2a2f3e07027cc5d3338 /src/filesystems/mod.rs | |
parent | 7635373786d1c0fbc45c326d4a0a8914396f7051 (diff) |
make the number of threads used for file summing configurable
Also replace lazy_static with once_cell
Diffstat (limited to 'src/filesystems/mod.rs')
-rw-r--r-- | src/filesystems/mod.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/filesystems/mod.rs b/src/filesystems/mod.rs index d04b991..62f26e1 100644 --- a/src/filesystems/mod.rs +++ b/src/filesystems/mod.rs @@ -12,13 +12,11 @@ pub use { use { crossterm::style::Color, - lazy_static::lazy_static, + once_cell::sync::Lazy, std::sync::Mutex, }; -lazy_static! { - pub static ref MOUNTS: Mutex<MountList> = Mutex::new(MountList::new()); -} +pub static MOUNTS: Lazy<Mutex<MountList>> = Lazy::new(|| Mutex::new(MountList::new())); pub fn clear_cache() { let mut mount_list = MOUNTS.lock().unwrap(); |