Merge pull request #2018 from jamesmunns/add-derives

Add some uncontroversial derives to Error types
This commit is contained in:
Dario Nieuwenhuis
2023-10-07 00:03:10 +00:00
committed by GitHub
10 changed files with 11 additions and 10 deletions

View File

@ -12,7 +12,7 @@ use crate::interrupt::typelevel::{Binding, Interrupt};
use crate::{interrupt, pac, peripherals, Peripheral};
/// I2C error abort reason
#[derive(Debug)]
#[derive(Debug, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum AbortReason {
/// A bus operation was not acknowledged, e.g. due to the addressed device
@ -27,7 +27,7 @@ pub enum AbortReason {
}
/// I2C error
#[derive(Debug)]
#[derive(Debug, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum Error {
/// I2C abort with error

View File

@ -10,7 +10,7 @@ use crate::interrupt::typelevel::{Binding, Interrupt};
use crate::{pac, Peripheral};
/// I2C error
#[derive(Debug)]
#[derive(Debug, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[non_exhaustive]
pub enum Error {