Fix a clippy warning

This commit is contained in:
moznion
2020-12-12 00:24:37 +09:00
parent a53ca1d40c
commit e61341004f
+1 -9
View File
@@ -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<Vec<u8>, String> {