From e8cd53e2917cfa2d158a959506e5a13fa0fc3795 Mon Sep 17 00:00:00 2001 From: yoshidan Date: Tue, 10 Oct 2023 17:24:10 +0900 Subject: [PATCH] fix clippy --- foundation/metadata/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/foundation/metadata/src/lib.rs b/foundation/metadata/src/lib.rs index 44689871..7b6c00a3 100644 --- a/foundation/metadata/src/lib.rs +++ b/foundation/metadata/src/lib.rs @@ -45,8 +45,7 @@ async fn test_on_gce() -> Result { let url = format!("http://{METADATA_IP}"); let response = client.get(&url).send().await; - if response.is_ok() { - let response = response.unwrap(); + if let Ok(response) = response { if response.status().is_success() { let on_gce = match response.headers().get(METADATA_FLAVOR_KEY) { None => false,