Skip to content

Commit

Permalink
netdog: Fix new clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
zmrow committed Jan 10, 2023
1 parent c46d996 commit d33f9a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/api/netdog/src/cli/write_resolv_conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ pub(crate) fn run() -> Result<()> {
// data, so don't bother looking there.
let primary_interface = primary_interface_name()?;

let primary_lease_path = dhcp_lease_path(&primary_interface);
let primary_lease_path = dhcp_lease_path(primary_interface);
let dns_settings = if let Some(primary_lease_path) = primary_lease_path {
let lease =
LeaseInfo::from_lease(&primary_lease_path).context(error::LeaseParseFailedSnafu)?;
LeaseInfo::from_lease(primary_lease_path).context(error::LeaseParseFailedSnafu)?;
DnsSettings::from_config_or_lease(Some(&lease)).context(error::GetDnsSettingsSnafu)?
} else {
DnsSettings::from_config_or_lease(None).context(error::GetDnsSettingsSnafu)?
Expand Down

0 comments on commit d33f9a4

Please sign in to comment.