From 35227ce437838bc8d0664ff21c2826679b8b9d4f Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Tue, 18 Dec 2018 15:46:12 +0100 Subject: Use unwrap_or_default instead of explicitly creating empty string. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(), _ => (), } } -- cgit v1.2.3