refactor: reaplace unwrap_or(()) with .ok()

This commit is contained in:
Jack Wills
2023-03-09 15:18:00 +00:00
parent 5582c45403
commit 8ba37a165b
4 changed files with 20 additions and 35 deletions
+2 -2
View File
@@ -109,8 +109,8 @@ impl DockerData {
.take(1);
while let Some(Ok(stats)) = stream.next().await {
let mem_stat = stats.memory_stats.usage.unwrap_or(0);
let mem_limit = stats.memory_stats.limit.unwrap_or(0);
let mem_stat = stats.memory_stats.usage.unwrap_or_default();
let mem_limit = stats.memory_stats.limit.unwrap_or_default();
let op_key = stats
.networks