From e7532aef9723a4078874d42ccb9a616628f1b3e6 Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Sat, 10 Nov 2018 10:00:43 +0100 Subject: Make enums comparable --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index 780efea..ee37a1d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -130,7 +130,7 @@ pub mod mode { } /// Data rate -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub enum DataRate { /// 128 SPS Sps128, @@ -149,7 +149,7 @@ pub enum DataRate { } /// Comparator mode (only for ADS1x14, ADS1x15) -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub enum ComparatorMode { /// Traditional comparator (default) /// @@ -167,7 +167,7 @@ pub enum ComparatorMode { } /// Comparator polarity (only for ADS1x14, ADS1x15) -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialEq)] pub enum ComparatorPolarity { /// Active low (default) ActiveLow, -- cgit v1.2.3-54-g00ecf