mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
Add PduId wrapper struct
Death to Vec<u8>
This commit is contained in:
parent
341f4213d0
commit
26322d5a95
15 changed files with 110 additions and 71 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue