datastore: clippy fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2022-07-27 15:26:50 +02:00
parent 4597eedf13
commit 1be05037c2
4 changed files with 6 additions and 4 deletions

View File

@ -121,6 +121,7 @@ pub struct SeekableCachedChunkReader<
reader: Arc<CachedChunkReader<I, R>>,
index_bytes: u64,
position: u64,
#[allow(clippy::type_complexity)]
read_future: Option<Pin<Box<dyn Future<Output = Result<(Vec<u8>, usize), Error>> + Send>>>,
}

View File

@ -31,7 +31,7 @@ pub trait BackupCatalogWriter {
}
#[repr(u8)]
#[derive(Copy, Clone, PartialEq)]
#[derive(Copy, Clone, PartialEq, Eq)]
pub enum CatalogEntryType {
Directory = b'd',
File = b'f',
@ -86,14 +86,14 @@ impl fmt::Display for CatalogEntryType {
///
/// The ``attr`` property contain the exact type with type specific
/// attributes.
#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Eq)]
pub struct DirEntry {
pub name: Vec<u8>,
pub attr: DirEntryAttribute,
}
/// Used to specific additional attributes inside DirEntry
#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum DirEntryAttribute {
Directory { start: u64 },
File { size: u64, mtime: i64 },

View File

@ -57,7 +57,7 @@ pub struct BackupManifest {
pub signature: Option<String>,
}
#[derive(PartialEq)]
#[derive(PartialEq, Eq)]
pub enum ArchiveType {
FixedIndex,
DynamicIndex,

View File

@ -121,6 +121,7 @@ pub struct SnapshotChunkIterator<'a, F: Fn(&[u8; 32]) -> bool> {
snapshot_reader: &'a SnapshotReader,
todo_list: Vec<String>,
skip_fn: F,
#[allow(clippy::type_complexity)]
current_index: Option<(Arc<Box<dyn IndexFile + Send>>, usize, Vec<(usize, u64)>)>,
}