Skip to content

Commit 414f20e

Browse files
committed
Add missing Eq implementations to enums
1 parent 0ecd8ab commit 414f20e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/adc/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ use core::convert::TryFrom;
5050
/// [`Adc::set_pin_sequence_position`]: `super::Adc::set_pin_sequence_position`
5151
/// [`Adc::set_channel_sequence_position`]: `super::Adc::set_channel_sequence_position`
5252
/// [`Adc::channel_sequence`]: `super::Adc::channel_sequence`
53-
#[derive(Debug, PartialEq, PartialOrd, Copy, Clone)]
53+
#[derive(Debug, PartialEq, PartialOrd, Eq, Ord, Copy, Clone)]
5454
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
5555
#[allow(missing_docs)]
5656
pub enum Sequence {

src/serial/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::time::rate::{Baud, Extensions};
66
/// Stop Bit configuration parameter for serial.
77
///
88
/// Wrapper around [`STOP_A`]
9-
#[derive(Clone, Copy, Debug, PartialEq)]
9+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1010
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
1111
pub enum StopBits {
1212
/// 0.5 stop bit
@@ -45,7 +45,7 @@ impl From<STOP_A> for StopBits {
4545
/// underlying USART will be configured to send/receive the parity bit in
4646
/// addtion to the data bits.
4747
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
48-
#[derive(Debug, Clone, Copy, PartialEq)]
48+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
4949
pub enum Parity {
5050
/// No parity bit will be added/checked.
5151
None,
@@ -73,7 +73,7 @@ pub enum Parity {
7373
/// assert!(config.parity == Parity::None);
7474
/// assert!(config.stopbits == StopBits::STOP1);
7575
/// ```
76-
#[derive(Debug, Clone, Copy, PartialEq)]
76+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7777
#[non_exhaustive]
7878
pub struct Config {
7979
/// Serial interface baud rate

src/spi/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use crate::time::rate::Generic;
3535
/// assert!(config.parity == Parity::None);
3636
/// assert!(config.stopbits == StopBits::STOP1);
3737
/// ```
38-
#[derive(Clone, Copy, PartialEq)]
38+
#[derive(Clone, Copy, PartialEq, Eq)]
3939
#[non_exhaustive]
4040
pub struct Config {
4141
/// Operating frequency of the SPI peripheral.

0 commit comments

Comments
 (0)