chore: update dependencies

This commit is contained in:
Michael Aaron Murphy 2024-08-21 03:07:16 +02:00
parent 6948373a68
commit 3ec53d7f8a
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
10 changed files with 350 additions and 304 deletions

View file

@ -5,10 +5,9 @@ edition = "2021"
[dependencies]
derive_setters = "0.1.6"
regex = "1.10.5"
regex = "1.10.6"
slotmap = "1.0.7"
libcosmic = { workspace = true }
generator = "0.7.5"
downcast-rs = "1.2.1"
once_cell = "1.19.0"
tokio.workspace = true

View file

@ -204,16 +204,11 @@ impl<Message: 'static> Binder<Message> {
&'a self,
rule: &'a Regex,
) -> impl Iterator<Item = (crate::Entity, section::Entity)> + 'a {
generator::Gn::new_scoped_local(|mut s| {
for (page, sections) in self.content.iter() {
for id in sections {
if self.sections[*id].search_matches(rule) {
s.yield_((page, *id));
}
}
}
generator::done!();
self.content.iter().flat_map(move |(page, sections)| {
sections
.into_iter()
.filter(|&id| self.sections[*id].search_matches(rule))
.map(move |&id| (page, id))
})
}