]> git.proxmox.com Git - proxmox-backup.git/blobdiff - src/tools/fuse_loop.rs
clippy: is_some/none/ok/err/empty
[proxmox-backup.git] / src / tools / fuse_loop.rs
index 8a8b668a0f0c5d527d4041f8e76e4e2d4edad725..ebc30398bf4d2c23845ecaba1134ba8465a3fa22 100644 (file)
@@ -113,7 +113,7 @@ impl<R: AsyncRead + AsyncSeek + Unpin> FuseLoopSession<R> {
         abort_chan: Receiver<()>,
     ) -> Result<(), Error> {
 
-        if let None = self.session {
+        if self.session.is_none() {
             panic!("internal error: fuse_loop::main called before ::map_loop");
         }
         let mut session = self.session.take().unwrap().fuse();
@@ -236,7 +236,7 @@ pub fn cleanup_unused_run_files(filter_name: Option<String>) {
 
                 // clean leftover FUSE instances (e.g. user called 'losetup -d' or similar)
                 // does nothing if files are already stagnant (e.g. instance crashed etc...)
-                if let Ok(_) = unmap_from_backing(&path, None) {
+                if unmap_from_backing(&path, None).is_ok() {
                     // we have reaped some leftover instance, tell the user
                     eprintln!(
                         "Cleaned up dangling mapping '{}': no loop device assigned",