Use unwrap_or_default() instead of unwrap_or_else(Default::default)

This commit is contained in:
Sebastian Dröge 2021-11-18 14:52:38 +02:00
parent 336f11e1ba
commit 7e62854e20

View file

@ -229,7 +229,7 @@ impl AlternativeMedia {
media_type: attrs
.get("TYPE")
.and_then(|s| AlternativeMediaType::from_str(s).ok())
.unwrap_or_else(Default::default),
.unwrap_or_default(),
uri: attrs.remove("URI"),
group_id: attrs.remove("GROUP-ID").unwrap_or_else(String::new),
language: attrs.remove("LANGUAGE"),