summaryrefslogtreecommitdiffstats
path: root/src/filesystems/mod.rs
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2021-06-02 13:45:12 +0200
committerCanop <cano.petrole@gmail.com>2021-06-02 13:45:12 +0200
commit77f40f74c38392a5213f99006138d74772ac5c6c (patch)
tree145732e2e45e0dd3bf17e2a2f3e07027cc5d3338 /src/filesystems/mod.rs
parent7635373786d1c0fbc45c326d4a0a8914396f7051 (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.rs6
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();