summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-11-10 02:06:13 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-12-22 02:03:35 +0100
commit59f15b41bc58b776e47041b168cdae11dc94e599 (patch)
treeaaeeba75433b84952ee52641f506b5cb587796c1
parent4c95345dc0feebc14e3ed9e4cc2c0d36ce44dd8a (diff)
Rewrite filter(...).next().is_some() with .any(...)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/domain/imag-calendar/src/util.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/domain/imag-calendar/src/util.rs b/bin/domain/imag-calendar/src/util.rs
index 2e9c831a..8c0994ba 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(|event| {
+ .any(|event| {
let take = event
.as_ref()
.map(|e| {
@@ -178,8 +178,6 @@ pub fn find_event_by_id<'a>(store: &'a Store, id: &str, refconfig: &Config) -> R
take
})
- .next()
- .is_some()
{
return Ok(Some(parsed))
}