From aa2940a92bcf4785fc452960ab6d50bbeb5038fa Mon Sep 17 00:00:00 2001 From: Zac Mrowicki Date: Wed, 10 Aug 2022 21:20:45 +0000 Subject: [PATCH] netdog: implement the suggested clippy lints --- sources/api/netdog/src/interface_name.rs | 4 +--- sources/api/netdog/src/net_config/v1.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sources/api/netdog/src/interface_name.rs b/sources/api/netdog/src/interface_name.rs index 397bbb219f3..f273806d176 100644 --- a/sources/api/netdog/src/interface_name.rs +++ b/sources/api/netdog/src/interface_name.rs @@ -61,9 +61,7 @@ impl TryFrom for InterfaceName { } ); - Ok(Self { - inner: input.to_string(), - }) + Ok(Self { inner: input }) } } diff --git a/sources/api/netdog/src/net_config/v1.rs b/sources/api/netdog/src/net_config/v1.rs index 11ba5e61205..ed59d2b97ad 100644 --- a/sources/api/netdog/src/net_config/v1.rs +++ b/sources/api/netdog/src/net_config/v1.rs @@ -113,7 +113,7 @@ impl FromStr for NetConfigV1 { fn from_str(s: &str) -> std::result::Result { let (name, options) = s - .split_once(":") + .split_once(':') .context(error::InvalidInterfaceDefSnafu { definition: s })?; if options.is_empty() || name.is_empty() {