Skip to content

Commit

Permalink
netdog: implement the suggested clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
zmrow committed Aug 12, 2022
1 parent 949b648 commit aa2940a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions sources/api/netdog/src/interface_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ impl TryFrom<String> for InterfaceName {
}
);

Ok(Self {
inner: input.to_string(),
})
Ok(Self { inner: input })
}
}

Expand Down
2 changes: 1 addition & 1 deletion sources/api/netdog/src/net_config/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl FromStr for NetConfigV1 {

fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
let (name, options) = s
.split_once(":")
.split_once(':')
.context(error::InvalidInterfaceDefSnafu { definition: s })?;

if options.is_empty() || name.is_empty() {
Expand Down

0 comments on commit aa2940a

Please sign in to comment.