From 07f5b917c65c7c40882789a67afa6d3e536ea651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Fri, 22 Aug 2025 15:04:26 +0200 Subject: [PATCH] Use .ok() instead of match --- acmed/src/http.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/acmed/src/http.rs b/acmed/src/http.rs index 8ac6d8a..2311ff6 100644 --- a/acmed/src/http.rs +++ b/acmed/src/http.rs @@ -23,10 +23,7 @@ pub struct ValidHttpResponse { impl ValidHttpResponse { pub fn get_header(&self, name: &str) -> Option { match self.headers.get(name) { - Some(r) => match header_to_string(r) { - Ok(h) => Some(h), - Err(_) => None, - }, + Some(r) => header_to_string(r).ok(), None => None, } }