misc clippy fixes
the trivial ones ;) Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
@ -217,7 +217,7 @@ struct SspDataEncryptionAlgorithmDescriptor {
|
||||
fn decode_spin_data_encryption_caps(data: &[u8]) -> Result<u8, Error> {
|
||||
|
||||
proxmox_lang::try_block!({
|
||||
let mut reader = &data[..];
|
||||
let mut reader = data;
|
||||
let _page: SspDataEncryptionCapabilityPage = unsafe { reader.read_be_value()? };
|
||||
|
||||
let mut aes_gcm_index = None;
|
||||
@ -268,7 +268,7 @@ struct SspDataEncryptionStatusPage {
|
||||
fn decode_spin_data_encryption_status(data: &[u8]) -> Result<DataEncryptionStatus, Error> {
|
||||
|
||||
proxmox_lang::try_block!({
|
||||
let mut reader = &data[..];
|
||||
let mut reader = data;
|
||||
let page: SspDataEncryptionStatusPage = unsafe { reader.read_be_value()? };
|
||||
|
||||
if page.page_code != 0x20 {
|
||||
|
@ -123,7 +123,7 @@ pub fn read_mam_attributes<F: AsRawFd>(file: &mut F) -> Result<Vec<MamAttribute>
|
||||
|
||||
fn decode_mam_attributes(data: &[u8]) -> Result<Vec<MamAttribute>, Error> {
|
||||
|
||||
let mut reader = &data[..];
|
||||
let mut reader = data;
|
||||
|
||||
let data_len: u32 = unsafe { reader.read_be_value()? };
|
||||
|
||||
|
@ -39,7 +39,7 @@ pub fn report_density<F: AsRawFd>(file: &mut F) -> Result<u8, Error> {
|
||||
let mut max_density = 0u8;
|
||||
|
||||
proxmox_lang::try_block!({
|
||||
let mut reader = &data[..];
|
||||
let mut reader = data;
|
||||
|
||||
let page_len: u16 = unsafe { reader.read_be_value()? };
|
||||
let page_len = page_len as usize;
|
||||
|
Reference in New Issue
Block a user