Skip to content

Commit b584c46

Browse files
committed
clippy fixes
1 parent a4cfabf commit b584c46

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1616
[#507]: https://github.com/stm32-rs/stm32f4xx-hal/pull/507
1717

1818
### Changed
19+
1920
- update `stm32f4` to 0.15.1
2021
- use `stm32_i2s_v12x` version 0.3, reexport it, and implements requirement for it
2122
- i2s module don't reuse marker from spi module and define its own.

src/dma/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use traits::{
2727
};
2828

2929
/// Errors.
30-
#[derive(PartialEq)]
30+
#[derive(PartialEq, Eq)]
3131
pub enum DMAError<T> {
3232
/// DMA not ready to change buffers.
3333
NotReady(T),
@@ -51,7 +51,7 @@ impl<T> Debug for DMAError<T> {
5151
}
5252

5353
/// Possible DMA's directions.
54-
#[derive(Debug, Clone, Copy, PartialEq)]
54+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5555
pub enum DmaDirection {
5656
/// Memory to Memory transfer.
5757
MemoryToMemory,
@@ -180,7 +180,7 @@ impl From<u8> for FifoLevel {
180180
}
181181

182182
/// Which DMA buffer is in use.
183-
#[derive(Debug, Clone, Copy, PartialEq)]
183+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
184184
pub enum CurrentBuffer {
185185
/// The first buffer (m0ar) is in use.
186186
FirstBuffer,

src/gpio/dynamic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub enum Dynamic {
2424
}
2525

2626
/// Error for [DynamicPin]
27-
#[derive(Debug, PartialEq)]
27+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
2828
pub enum PinModeError {
2929
/// For operations unsupported in current mode
3030
IncorrectMode,

src/i2c.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub enum DutyCycle {
1818
Ratio16to9,
1919
}
2020

21-
#[derive(Debug, PartialEq)]
21+
#[derive(Debug, PartialEq, Eq)]
2222
pub enum Mode {
2323
Standard {
2424
frequency: Hertz,

src/serial.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub mod config {
5252
use crate::time::U32Ext;
5353

5454
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
55-
#[derive(Debug, Clone, Copy, PartialEq)]
55+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
5656
pub enum WordLength {
5757
DataBits8,
5858
DataBits9,
@@ -62,7 +62,7 @@ pub mod config {
6262
/// underlying USART will be configured to send/receive the parity bit in
6363
/// addtion to the data bits.
6464
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
65-
#[derive(Debug, Clone, Copy, PartialEq)]
65+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
6666
pub enum Parity {
6767
/// No parity bit will be added/checked.
6868
ParityNone,
@@ -78,7 +78,7 @@ pub mod config {
7878
///
7979
/// Wrapper around `STOP_A`
8080
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
81-
#[derive(Clone, Copy, Debug, PartialEq)]
81+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8282
pub enum StopBits {
8383
#[doc = "1 stop bit"]
8484
STOP1,
@@ -91,7 +91,7 @@ pub mod config {
9191
}
9292

9393
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
94-
#[derive(Debug, Clone, Copy, PartialEq)]
94+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
9595
pub enum DmaConfig {
9696
None,
9797
Tx,
@@ -100,7 +100,7 @@ pub mod config {
100100
}
101101

102102
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
103-
#[derive(Debug, Clone, Copy, PartialEq)]
103+
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
104104
pub struct Config {
105105
pub baudrate: Bps,
106106
pub wordlength: WordLength,

src/timer.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub struct Timer<TIM> {
4141
pub(crate) clk: Hertz,
4242
}
4343

44-
#[derive(Clone, Copy, PartialEq)]
44+
#[derive(Clone, Copy, PartialEq, Eq)]
4545
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
4646
#[repr(u8)]
4747
pub enum Channel {
@@ -52,7 +52,7 @@ pub enum Channel {
5252
}
5353

5454
/// Interrupt events
55-
#[derive(Clone, Copy, PartialEq)]
55+
#[derive(Clone, Copy, PartialEq, Eq)]
5656
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
5757
pub enum SysEvent {
5858
/// [Timer] timed out / count down ended
@@ -201,7 +201,7 @@ impl Timer<SYST> {
201201
}
202202
}
203203

204-
#[derive(Clone, Copy, Debug, PartialEq)]
204+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
205205
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
206206
#[repr(u8)]
207207
pub enum Ocm {

0 commit comments

Comments
 (0)