aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2018-12-18 15:46:12 +0100
committerHarald Eilertsen <haraldei@anduin.net>2018-12-18 15:46:12 +0100
commit35227ce437838bc8d0664ff21c2826679b8b9d4f (patch)
tree1b8ecdfa2a24530ef6d35aaaece4678cd3ef89a1 /src
parent7c2454f33cb2b3d6b8005c2ab9c09ff406870b8f (diff)
downloadicaltool-35227ce437838bc8d0664ff21c2826679b8b9d4f.tar.gz
icaltool-35227ce437838bc8d0664ff21c2826679b8b9d4f.tar.bz2
icaltool-35227ce437838bc8d0664ff21c2826679b8b9d4f.zip
Use unwrap_or_default instead of explicitly creating empty string.
Diffstat (limited to 'src')
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 50f3eaa..a7747c7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -44,7 +44,7 @@ fn print_event(event: &ical::parser::ical::component::IcalEvent) {
match p.name.as_ref() {
"DTSTART" => start = parse_datetime(p.value.clone()),
"DTEND" => end = parse_datetime(p.value.clone()),
- "SUMMARY" => summary = p.value.clone().unwrap_or_else(String::new),
+ "SUMMARY" => summary = p.value.clone().unwrap_or_default(),
_ => (),
}
}