mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 08:11:24 +01:00
37 errors left
This commit is contained in:
parent
44fe6d1554
commit
33a2b2b772
19 changed files with 764 additions and 482 deletions
|
|
@ -54,19 +54,20 @@ impl service::rooms::search::Data for KeyValueDatabase {
|
|||
.map(|(key, _)| key[key.len() - size_of::<u64>()..].to_vec())
|
||||
});
|
||||
|
||||
Ok(utils::common_elements(iterators, |a, b| {
|
||||
let common_elements = match utils::common_elements(iterators, |a, b| {
|
||||
// We compare b with a because we reversed the iterator earlier
|
||||
b.cmp(a)
|
||||
})
|
||||
.map(|iter| {
|
||||
(
|
||||
Box::new(iter.map(move |id| {
|
||||
}) {
|
||||
Some(it) => it,
|
||||
None => return Ok(None),
|
||||
};
|
||||
|
||||
let mapped = common_elements.map(move |id| {
|
||||
let mut pduid = prefix_clone.clone();
|
||||
pduid.extend_from_slice(&id);
|
||||
pduid
|
||||
})),
|
||||
words,
|
||||
)
|
||||
}))
|
||||
});
|
||||
|
||||
Ok(Some((Box::new(mapped), words)))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue