refactor: use unwrap_or_default()

This commit is contained in:
Jack Wills
2023-03-11 21:04:44 +00:00
parent d9f0bd5566
commit 79de92c392
+1 -1
View File
@@ -561,7 +561,7 @@ impl AppData {
let id = ContainerId::from(id);
let created = i.created.map_or(0, |i| u64::try_from(i).unwrap_or(0));
let created = i.created.map_or(0, |i| u64::try_from(i).unwrap_or_default());
// If container info already in containers Vec, then just update details
if let Some(item) = self.get_container_by_id(&id) {
if item.name != name {