diff --git a/radius/src/attributes.rs b/radius/src/attributes.rs index 6bbf3a2..dc72b15 100644 --- a/radius/src/attributes.rs +++ b/radius/src/attributes.rs @@ -60,15 +60,7 @@ impl Attributes { } pub(crate) fn lookup_all(&self, typ: AVPType) -> Vec<&AVP> { - self.0 - .iter() - .filter_map(|avp| { - if avp.typ == typ { - return Some(avp); - } - None - }) - .collect() + self.0.iter().filter(|&avp| avp.typ == typ).collect() } pub(crate) fn encode(&self) -> Result, String> {