aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/icaltool.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/icaltool.rs b/src/icaltool.rs
index 6776c0b..a98c4c8 100644
--- a/src/icaltool.rs
+++ b/src/icaltool.rs
@@ -41,8 +41,8 @@ impl Icaltool {
println!("Found {} calendard in file...", calendars.len());
for c in calendars {
- for e in c.events.iter().filter(|e| match_event(&e, &icaltool.pattern)) {
- print_event(&e);
+ for e in c.events.iter().filter(|e| match_event(e, &icaltool.pattern)) {
+ print_event(e);
}
}
@@ -115,13 +115,13 @@ fn match_event(event: &IcalEvent, pattern: &str) -> bool {
(String::from("*"), parts[0])
};
- let re = RegexBuilder::new(&pat)
+ let re = RegexBuilder::new(pat)
.case_insensitive(true)
.build()
.unwrap();
event.properties.iter()
- .filter(|ref p| (&key == "*" || p.name == key) && re.is_match(&p.value.clone().unwrap()))
+ .filter(|p| (&key == "*" || p.name == key) && re.is_match(&p.value.clone().unwrap()))
.count() > 0
}
}