clippy: fix Mutex with unused value
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
3d8cd0ced7
commit
81b2a87232
@ -125,7 +125,7 @@ pub fn update_dns(
|
|||||||
) -> Result<Value, Error> {
|
) -> Result<Value, Error> {
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref MUTEX: Arc<Mutex<usize>> = Arc::new(Mutex::new(0));
|
static ref MUTEX: Arc<Mutex<()>> = Arc::new(Mutex::new(()));
|
||||||
}
|
}
|
||||||
|
|
||||||
let _guard = MUTEX.lock();
|
let _guard = MUTEX.lock();
|
||||||
|
@ -18,7 +18,7 @@ pub struct ChunkStore {
|
|||||||
name: String, // used for error reporting
|
name: String, // used for error reporting
|
||||||
pub (crate) base: PathBuf,
|
pub (crate) base: PathBuf,
|
||||||
chunk_dir: PathBuf,
|
chunk_dir: PathBuf,
|
||||||
mutex: Mutex<bool>,
|
mutex: Mutex<()>,
|
||||||
locker: Arc<Mutex<tools::ProcessLocker>>,
|
locker: Arc<Mutex<tools::ProcessLocker>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ impl ChunkStore {
|
|||||||
base,
|
base,
|
||||||
chunk_dir,
|
chunk_dir,
|
||||||
locker,
|
locker,
|
||||||
mutex: Mutex::new(false)
|
mutex: Mutex::new(())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ lazy_static! {
|
|||||||
/// management interface for backup.
|
/// management interface for backup.
|
||||||
pub struct DataStore {
|
pub struct DataStore {
|
||||||
chunk_store: Arc<ChunkStore>,
|
chunk_store: Arc<ChunkStore>,
|
||||||
gc_mutex: Mutex<bool>,
|
gc_mutex: Mutex<()>,
|
||||||
last_gc_status: Mutex<GarbageCollectionStatus>,
|
last_gc_status: Mutex<GarbageCollectionStatus>,
|
||||||
verify_new: bool,
|
verify_new: bool,
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ impl DataStore {
|
|||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
chunk_store: Arc::new(chunk_store),
|
chunk_store: Arc::new(chunk_store),
|
||||||
gc_mutex: Mutex::new(false),
|
gc_mutex: Mutex::new(()),
|
||||||
last_gc_status: Mutex::new(gc_status),
|
last_gc_status: Mutex::new(gc_status),
|
||||||
verify_new: config.verify_new.unwrap_or(false),
|
verify_new: config.verify_new.unwrap_or(false),
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user