clippy: remove unnecessary &mut
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
05725ac9a4
commit
ccec086e25
@ -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]
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user