diff --git a/ohttp/src/lib.rs b/ohttp/src/lib.rs index 6f52385..ba1b57d 100644 --- a/ohttp/src/lib.rs +++ b/ohttp/src/lib.rs @@ -117,8 +117,9 @@ impl ClientRequest { /// See `KeyConfig::decode_list` for the structure details. pub fn from_encoded_config_list(encoded_config_list: &[u8]) -> Res { let mut configs = KeyConfig::decode_list(encoded_config_list)?; - let Some(mut config) = configs.pop() else { - return Err(Error::Unsupported); + let mut config = match configs.pop() { + Some(c) => c, + None => return Err(Error::Unsupported), }; Self::from_config(&mut config) }