mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust: Apply suggested fixes from clippy
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// Copyright IBM Corp. 2024
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::Result;
|
||||
use log::{info, warn};
|
||||
@@ -27,7 +27,7 @@ fn hdr_test_target_hashes(hdr: &SeHdr, key_hashes: &Path) -> Result<bool> {
|
||||
ref source,
|
||||
} if matches!(ty, FileAccessErrorType::Open)
|
||||
&& source.kind() == std::io::ErrorKind::NotFound
|
||||
&& *path == PathBuf::from(UvKeyHashesV1::SYS_UV_KEYS_ALL) =>
|
||||
&& path == Path::new(UvKeyHashesV1::SYS_UV_KEYS_ALL) =>
|
||||
{
|
||||
Error::UnavailableQueryUvKeyHashesSupport { source: err }
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ pub trait SeHdrPubBuilderTrait {
|
||||
fn set_pcf(&mut self, pcf: &PlaintextControlFlagsV1) -> Result<()>;
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[enum_dispatch(SeHdrData)]
|
||||
pub trait SeHdrConfBuilderTrait {
|
||||
fn generate_cck(&self) -> Result<SymKey>;
|
||||
|
||||
@@ -18,6 +18,7 @@ trait UvKeyHashTrait: AsRef<[u8]> {}
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
pub struct UvKeyHashV1([u8; 32]);
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[non_exhaustive]
|
||||
#[enum_dispatch]
|
||||
#[derive(PartialEq, Eq, Debug)]
|
||||
|
||||
Reference in New Issue
Block a user