feat: Rework the UpdateBuilder struct

This commit is contained in:
Clément Renault
2019-01-02 15:07:46 +01:00
parent b2e9ae4136
commit 95dc6fe904
8 changed files with 150 additions and 67 deletions

View File

@ -232,11 +232,11 @@ where D: Deref<Target=DB>,
// we must compute the real distinguished len of this sub-group
for document in group.iter() {
let filter_accepted = match &self.inner.filter {
None => true,
Some(filter) => {
let entry = filter_map.entry(document.id);
*entry.or_insert_with(|| (filter)(document.id, view))
},
None => true,
};
if filter_accepted {