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:
@@ -925,18 +925,11 @@ fn parse_dict_file(dict_file_path: &Path) -> Result<DictParsed, String> {
|
|||||||
}
|
}
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
// XXX ad-hoc
|
// XXX ad-hoc
|
||||||
let cap = fixed_length_octets_re.captures(items[3]);
|
let maybe_cap = fixed_length_octets_re.captures(items[3]);
|
||||||
if cap.is_some() {
|
if let Some(cap) = maybe_cap {
|
||||||
(
|
(
|
||||||
RadiusAttributeValueType::Octets,
|
RadiusAttributeValueType::Octets,
|
||||||
Some(
|
Some(cap.get(1).unwrap().as_str().parse::<usize>().unwrap()),
|
||||||
cap.unwrap()
|
|
||||||
.get(1)
|
|
||||||
.unwrap()
|
|
||||||
.as_str()
|
|
||||||
.parse::<usize>()
|
|
||||||
.unwrap(),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
return Err(format!("invalid type has come => {}", items[3]));
|
return Err(format!("invalid type has come => {}", items[3]));
|
||||||
|
|||||||
Reference in New Issue
Block a user