Skip to content

Commit 588150c

Browse files
committed
Add implementations of the common traits for SpidevOptions
1 parent e5c0029 commit 588150c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[Full Changelog](https://github.com/rust-embedded/rust-spidev/compare/0.4.1...HEAD)
66

77
- Added `Debug` implementation for `Spidev`
8-
- Added `Default` implementation for `SpidevOptions`
8+
- Added `Debug`, `Default`, `Copy` and `PartialEq` implementations for `SpidevOptions`
99
- Nix bumped to 0.22
1010
- bitflags updated to 1.3
1111
- Minimum supported rust version is now 1.46.0

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub struct Spidev {
129129
/// Options that are not configured with one of the builder
130130
/// functions will not be modified in the kernel when
131131
/// `configure` is called.
132-
#[derive(Default, Clone)]
132+
#[derive(Debug, Default, Clone, Copy, PartialEq)]
133133
pub struct SpidevOptions {
134134
pub bits_per_word: Option<u8>,
135135
pub max_speed_hz: Option<u32>,

0 commit comments

Comments
 (0)