diff --git a/src/backup/key_derivation.rs b/src/backup/key_derivation.rs index 73478c00..6b6e7484 100644 --- a/src/backup/key_derivation.rs +++ b/src/backup/key_derivation.rs @@ -278,7 +278,7 @@ pub fn rsa_decrypt_key_config( let decrypted = rsa .private_decrypt(key, &mut buffer, openssl::rsa::Padding::PKCS1) .map_err(|err| format_err!("failed to decrypt KeyConfig using RSA - {}", err))?; - decrypt_key(&mut buffer[..decrypted], passphrase) + decrypt_key(&buffer[..decrypted], passphrase) } #[test] diff --git a/src/tape/sgutils2.rs b/src/tape/sgutils2.rs index 31cd61b5..65deed70 100644 --- a/src/tape/sgutils2.rs +++ b/src/tape/sgutils2.rs @@ -191,16 +191,16 @@ impl <'a, F: AsRawFd> SgRaw<'a, F> { } // todo: what about sense data? - let _sense_len = unsafe { get_scsi_pt_sense_len(&mut *ptvp) }; + let _sense_len = unsafe { get_scsi_pt_sense_len(&*ptvp) }; - let status = unsafe { get_scsi_pt_status_response(&mut *ptvp) }; + let status = unsafe { get_scsi_pt_status_response(&*ptvp) }; if status != 0 { // toto: improve error reporting bail!("unknown scsi error - status response {}", status); } let data_len = self.buffer.len() - - (unsafe { get_scsi_pt_resid(&mut *ptvp) } as usize); + (unsafe { get_scsi_pt_resid(&*ptvp) } as usize); if data_len == 0 { bail!("do_scsi_pt failed - no data received"); } @@ -248,9 +248,9 @@ impl <'a, F: AsRawFd> SgRaw<'a, F> { } // todo: what about sense data? - let _sense_len = unsafe { get_scsi_pt_sense_len(&mut *ptvp) }; + let _sense_len = unsafe { get_scsi_pt_sense_len(&*ptvp) }; - let status = unsafe { get_scsi_pt_status_response(&mut *ptvp) }; + let status = unsafe { get_scsi_pt_status_response(&*ptvp) }; if status != 0 { // toto: improve error reporting bail!("unknown scsi error - status response {}", status);