From 02ac0082789b324bbb2402565f0869755c46aded Mon Sep 17 00:00:00 2001 From: ZeWaka Date: Thu, 9 Feb 2023 23:02:02 -0800 Subject: [PATCH] small clippy changes - partialeq_to_none (#6) --- Cargo.toml | 2 +- src/dmi.rs | 2 +- src/dmi/icon.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a02a268..9a45467 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dmi" -version = "0.2.0" +version = "0.2.1" edition = "2021" license = "MIT" description = "DMI library written in Rust. Provides helpers to manipulate and produce DMI format files." diff --git a/src/dmi.rs b/src/dmi.rs index 473da2a..72efde5 100644 --- a/src/dmi.rs +++ b/src/dmi.rs @@ -93,7 +93,7 @@ impl RawDmi { _ => other_chunks.push(raw_chunk), } } - if chunk_ihdr == None { + if chunk_ihdr.is_none() { return Err(error::DmiError::Generic( "Failed to load DMI. Buffer end reached without finding an IHDR chunk.".to_string(), )); diff --git a/src/dmi/icon.rs b/src/dmi/icon.rs index 377a6c3..0a6d5a0 100644 --- a/src/dmi/icon.rs +++ b/src/dmi/icon.rs @@ -229,7 +229,7 @@ impl Icon { }; } - if dirs == None || frames == None { + if dirs.is_none() || frames.is_none() { return Err(error::DmiError::Generic(format!( "Error loading icon: state lacks essential settings. dirs: {:#?}. frames: {:#?}.", dirs, frames