clean PR warnings

This commit is contained in:
ManyTheFish
2023-10-10 11:23:16 +02:00
committed by Louis Dureuil
parent 66c2c82a18
commit 1c5705c164
11 changed files with 11 additions and 103 deletions

View File

@ -11,6 +11,7 @@ use crate::Result;
pub type MergeFn = for<'a> fn(&[u8], &[Cow<'a, [u8]>]) -> Result<Cow<'a, [u8]>>;
#[allow(unused)]
pub fn concat_u32s_array<'a>(_key: &[u8], values: &[Cow<'a, [u8]>]) -> Result<Cow<'a, [u8]>> {
if values.len() == 1 {
Ok(values[0].clone())

View File

@ -44,6 +44,7 @@ where
Some((head, tail))
}
#[allow(unused)]
pub fn read_u32_ne_bytes(bytes: &[u8]) -> impl Iterator<Item = u32> + '_ {
bytes.chunks_exact(4).flat_map(TryInto::try_into).map(u32::from_ne_bytes)
}