summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-11-10 01:11:08 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-12-22 02:03:35 +0100
commit2c6f57d8a061cc7fe8d7e46cd145af3bbec8b624 (patch)
treebc2348d140f54602749e232c01dbed243ef2e739
parentcc404252616671c045973efee679ace2f9686eb7 (diff)
Rewrite filter_map() as simple filter()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/domain/imag-calendar/src/util.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/domain/imag-calendar/src/util.rs b/bin/domain/imag-calendar/src/util.rs
index a3f17350..416404ab 100644
--- a/bin/domain/imag-calendar/src/util.rs
+++ b/bin/domain/imag-calendar/src/util.rs
@@ -163,7 +163,7 @@ pub fn find_event_by_id<'a>(store: &'a Store, id: &str, refconfig: &Config) -> R
if parsed
.get_data()
.events()
- .filter_map(|event| if event
+ .filter(|event| if event
.as_ref()
.map(|e| {
trace!("Checking whether {:?} starts with {}", e.uid(), id);
@@ -172,9 +172,9 @@ pub fn find_event_by_id<'a>(store: &'a Store, id: &str, refconfig: &Config) -> R
.unwrap_or(false)
{
trace!("Seems to be relevant");
- Some(event)
+ true
} else {
- None
+ false
})
.next()
.is_some()