]> git.proxmox.com Git - proxmox-backup.git/commitdiff
tape: trivial clippy fixes
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 28 Jul 2022 07:55:23 +0000 (09:55 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 28 Jul 2022 07:55:23 +0000 (09:55 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
pbs-tape/src/sgutils2.rs

index 085a2263829a823b2c2f69871b9d8572365bd437..551976bc8b3066e337a48cb0d418d32b305a88db 100644 (file)
@@ -521,17 +521,15 @@ impl<'a, F: AsRawFd> SgRaw<'a, F> {
                 Err(ScsiError::Sense(sense))
             }
             SCSI_PT_RESULT_TRANSPORT_ERR => {
-                return Err(format_err!("scsi command failed: transport error").into())
+                Err(format_err!("scsi command failed: transport error").into())
             }
             SCSI_PT_RESULT_OS_ERR => {
                 let errno = unsafe { get_scsi_pt_os_err(ptvp.as_ptr()) };
                 let err = nix::errno::Errno::from_i32(errno);
-                return Err(format_err!("scsi command failed with err {}", err).into());
+                Err(format_err!("scsi command failed with err {}", err).into())
             }
             unknown => {
-                return Err(
-                    format_err!("scsi command failed: unknown result category {}", unknown).into(),
-                )
+                Err(format_err!("scsi command failed: unknown result category {}", unknown).into())
             }
         }
     }