Browse Source

Use .ok() instead of match

main
Rodolphe Bréard 2 months ago
parent
commit
07f5b917c6
Failed to extract signature
  1. 5
      acmed/src/http.rs

5
acmed/src/http.rs

@ -23,10 +23,7 @@ pub struct ValidHttpResponse {
impl ValidHttpResponse {
pub fn get_header(&self, name: &str) -> Option<String> {
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,
}
}

Loading…
Cancel
Save