mirror of
https://github.com/cubixle/radius-rs.git
synced 2026-04-30 14:28:44 +01:00
Fix a clippy warning
This commit is contained in:
@@ -60,15 +60,7 @@ impl Attributes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn lookup_all(&self, typ: AVPType) -> Vec<&AVP> {
|
pub(crate) fn lookup_all(&self, typ: AVPType) -> Vec<&AVP> {
|
||||||
self.0
|
self.0.iter().filter(|&avp| avp.typ == typ).collect()
|
||||||
.iter()
|
|
||||||
.filter_map(|avp| {
|
|
||||||
if avp.typ == typ {
|
|
||||||
return Some(avp);
|
|
||||||
}
|
|
||||||
None
|
|
||||||
})
|
|
||||||
.collect()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn encode(&self) -> Result<Vec<u8>, String> {
|
pub(crate) fn encode(&self) -> Result<Vec<u8>, String> {
|
||||||
|
|||||||
Reference in New Issue
Block a user