Skip to content

Commit

Permalink
fix new rust 1.80 lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Aug 5, 2024
1 parent f0ae7ef commit 06d8a9e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/dhcp_proxy/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl<W: Write + Clear> LeaseCache<W> {
/// # 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<LeaseCache<W>, Error>
///
Expand Down
5 changes: 1 addition & 4 deletions src/dhcp_proxy/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ pub mod g_rpc {
impl From<DhcpV4Lease> 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 {
Expand Down

0 comments on commit 06d8a9e

Please sign in to comment.