Add PduId wrapper struct

Death to Vec<u8>
This commit is contained in:
Lambda 2024-08-26 16:47:50 +00:00
parent 341f4213d0
commit 26322d5a95
15 changed files with 110 additions and 71 deletions

View file

@ -113,14 +113,14 @@ pub(crate) fn calculate_hash(keys: &[&[u8]]) -> Vec<u8> {
hash.as_ref().to_owned()
}
pub(crate) fn common_elements<I, F>(
pub(crate) fn common_elements<I, T, F>(
mut iterators: I,
check_order: F,
) -> Option<impl Iterator<Item = Vec<u8>>>
) -> Option<impl Iterator<Item = T>>
where
I: Iterator,
I::Item: Iterator<Item = Vec<u8>>,
F: Fn(&[u8], &[u8]) -> Ordering,
I::Item: Iterator<Item = T>,
F: Fn(&T, &T) -> Ordering,
{
let first_iterator = iterators.next()?;
let mut other_iterators =