some clippy fixes

This commit is contained in:
2025-01-10 17:19:28 +01:00
parent cf55fe1504
commit f438e7e40f
6 changed files with 17 additions and 14 deletions

View File

@ -320,7 +320,6 @@ macro_rules! pin_id {
//==================================================================================================
/// A type-level GPIO pin, parameterized by [PinId] and [PinMode] types
pub struct Pin<I: PinId, M: PinMode> {
pub(in crate::gpio) regs: Registers<I>,
mode: PhantomData<M>,

View File

@ -284,17 +284,17 @@ impl IrqResultMaxSizeOrTimeout {
#[inline]
pub fn overflow_error(&self) -> bool {
self.errors.map_or(false, |e| e.overflow)
self.errors.is_some_and(|e| e.overflow)
}
#[inline]
pub fn framing_error(&self) -> bool {
self.errors.map_or(false, |e| e.framing)
self.errors.is_some_and(|e| e.framing)
}
#[inline]
pub fn parity_error(&self) -> bool {
self.errors.map_or(false, |e| e.parity)
self.errors.is_some_and(|e| e.parity)
}
#[inline]