clippy: use matches!

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2021-01-19 11:08:10 +01:00
parent 6334bdc1c5
commit a6bd669854
4 changed files with 6 additions and 18 deletions

View File

@ -546,7 +546,7 @@ impl DataStore {
}
pub fn garbage_collection_running(&self) -> bool {
if let Ok(_) = self.gc_mutex.try_lock() { false } else { true }
!matches!(self.gc_mutex.try_lock(), Ok(_))
}
pub fn garbage_collection(&self, worker: &dyn TaskState, upid: &UPID) -> Result<(), Error> {