From f27156dfe9281c8a0a95711b5aad4d3c3cbda614 Mon Sep 17 00:00:00 2001 From: Anthony Whalley Date: Sun, 23 Jan 2022 10:41:26 +0000 Subject: [PATCH] fix clippy --- core-dump-composer/src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core-dump-composer/src/main.rs b/core-dump-composer/src/main.rs index 9cf7d90..569b67d 100644 --- a/core-dump-composer/src/main.rs +++ b/core-dump-composer/src/main.rs @@ -70,10 +70,9 @@ fn main() -> Result<(), anyhow::Error> { } }; - let namespace = match pod_object["metadata"]["namespace"].as_str() { - Some(s) => s, - None => "unknown", - }; + let namespace = pod_object["metadata"]["namespace"] + .as_str() + .unwrap_or("unknown"); cc.set_namespace(namespace.to_string()); // Create the base zip file that we are going to put everything into