@@ -49,7 +49,7 @@ use embedded_hal::PwmPin;
4949pub type PwmDuty = u16 ;
5050
5151/// MockPin transaction
52- #[ derive( PartialEq , Clone , Debug ) ]
52+ #[ derive( PartialEq , Eq , Clone , Debug ) ]
5353pub struct Transaction {
5454 /// Kind is the transaction kind (and data) expected
5555 kind : TransactionKind ,
@@ -59,7 +59,7 @@ pub struct Transaction {
5959 err : Option < MockError > ,
6060}
6161
62- #[ derive( PartialEq , Clone , Debug ) ]
62+ #[ derive( PartialEq , Eq , Copy , Clone , Debug ) ]
6363/// Digital pin value enumeration
6464pub enum State {
6565 /// Digital low state
@@ -126,7 +126,7 @@ impl Transaction {
126126}
127127
128128/// MockPin transaction kind.
129- #[ derive( PartialEq , Clone , Debug ) ]
129+ #[ derive( PartialEq , Eq , Clone , Debug ) ]
130130pub enum TransactionKind {
131131 /// Set the pin state
132132 Set ( State ) ,
@@ -212,7 +212,7 @@ impl InputPin for Mock {
212212
213213 let Transaction { kind, err } = s. next ( ) . expect ( "no expectation for pin::is_high call" ) ;
214214
215- assert_eq ! ( kind. is_get( ) , true , "expected pin::get" ) ;
215+ assert ! ( kind. is_get( ) , "expected pin::get" ) ;
216216
217217 if let Some ( e) = err {
218218 Err ( e)
@@ -229,7 +229,7 @@ impl InputPin for Mock {
229229
230230 let Transaction { kind, err } = s. next ( ) . expect ( "no expectation for pin::is_low call" ) ;
231231
232- assert_eq ! ( kind. is_get( ) , true , "expected pin::get" ) ;
232+ assert ! ( kind. is_get( ) , "expected pin::get" ) ;
233233
234234 if let Some ( e) = err {
235235 Err ( e)
0 commit comments