Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
  • Loading branch information
rwestphal committed Oct 4, 2024
1 parent 129de4b commit d4af34c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/internal_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,11 @@ impl<'a> YangTableBuilder<'a> {
match format {
YangValueDisplayFormat::Raw => value,
YangValueDisplayFormat::Hex16 => {
let value =
u32::from_str_radix(&value, 10).unwrap();
let value = value.parse::<u32>().unwrap();
format!("{:#06x}", value)
}
YangValueDisplayFormat::Hex32 => {
let value =
u32::from_str_radix(&value, 10).unwrap();
let value = value.parse::<u32>().unwrap();
format!("{:#010x}", value)
}
}
Expand Down

0 comments on commit d4af34c

Please sign in to comment.