mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-05 17:19:42 +00:00
Use unwrap_or_else() for the default value in the DateTime Display impl
This commit is contained in:
parent
05c51dd778
commit
ad7b21ba55
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ impl fmt::Display for DateTime {
|
|||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.write_str(
|
||||
self.to_iso8601_string()
|
||||
.unwrap_or(String::from("None"))
|
||||
.unwrap_or_else(|| String::from("None"))
|
||||
.as_str(),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue