From 9fe2f639b89adab00556b46abfc2bc906111523b Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 25 Oct 2019 18:03:55 +0200 Subject: [PATCH] allow(clippy::cast_ptr_alignment) --- src/backup/dynamic_index.rs | 2 ++ src/backup/fixed_index.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/backup/dynamic_index.rs b/src/backup/dynamic_index.rs index ef6b3178..ddb09f9a 100644 --- a/src/backup/dynamic_index.rs +++ b/src/backup/dynamic_index.rs @@ -131,6 +131,7 @@ impl DynamicIndexReader { Ok(()) } + #[allow(clippy::cast_ptr_alignment)] pub fn chunk_info(&self, pos: usize) -> Result<(u64, u64, [u8; 32]), Error> { if pos >= self.index_entries { bail!("chunk index out of range"); @@ -156,6 +157,7 @@ impl DynamicIndexReader { } #[inline] + #[allow(clippy::cast_ptr_alignment)] fn chunk_end(&self, pos: usize) -> u64 { if pos >= self.index_entries { panic!("chunk index out of range"); diff --git a/src/backup/fixed_index.rs b/src/backup/fixed_index.rs index b3a5459b..9dbdada8 100644 --- a/src/backup/fixed_index.rs +++ b/src/backup/fixed_index.rs @@ -256,6 +256,7 @@ impl Drop for FixedIndexWriter { impl FixedIndexWriter { + #[allow(clippy::cast_ptr_alignment)] pub fn create(store: Arc, path: &Path, size: usize, chunk_size: usize) -> Result { let shared_lock = store.try_shared_lock()?;