From 06d8a9e47b6c5840ef87d24e3e27dcd3a3210dba Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 5 Aug 2024 15:52:44 +0200 Subject: [PATCH] fix new rust 1.80 lint issues Signed-off-by: Paul Holzinger --- src/dhcp_proxy/cache.rs | 2 +- src/dhcp_proxy/lib.rs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/dhcp_proxy/cache.rs b/src/dhcp_proxy/cache.rs index da8957695..0ad983075 100644 --- a/src/dhcp_proxy/cache.rs +++ b/src/dhcp_proxy/cache.rs @@ -43,7 +43,7 @@ impl LeaseCache { /// # Arguments /// /// * `writer`: any type that can has the Write and Clear trait implemented. In production this - /// is a file. In development/testing this is a Cursor of bytes + /// is a file. In development/testing this is a Cursor of bytes /// /// returns: Result, Error> /// diff --git a/src/dhcp_proxy/lib.rs b/src/dhcp_proxy/lib.rs index 848b76b05..cb35bc02b 100644 --- a/src/dhcp_proxy/lib.rs +++ b/src/dhcp_proxy/lib.rs @@ -40,10 +40,7 @@ pub mod g_rpc { impl From for Lease { fn from(l: DhcpV4Lease) -> Lease { // Since these fields are optional as per mozim. Match them first and then set them - let domain_name = match l.domain_name { - None => String::from(""), - Some(l) => l, - }; + let domain_name = l.domain_name.unwrap_or_default(); let mtu = l.mtu.unwrap_or(0) as u32; Lease {