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 7f27321
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 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 Expand Up @@ -332,7 +330,7 @@ pub trait DataNodeRefExt {
fn relative_opt_value(&self, xpath: &str) -> Option<String>;
}

impl<'a, 'b> DataNodeRefExt for DataNodeRef<'a, 'b> {
impl DataNodeRefExt for DataNodeRef<'_, '_> {
fn child_value(&self, name: &str) -> String {
self.child_opt_value(name).unwrap_or("-".to_owned())
}
Expand Down

0 comments on commit 7f27321

Please sign in to comment.