Skip to content

Commit 0b13eea

Browse files
committed
Add Default implementation for SpidevOptions
1 parent 63d6867 commit 0b13eea

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
[Full Changelog](https://github.com/rust-embedded/rust-spidev/compare/0.4.1...HEAD)
66

7+
- Added `Default` implementation for `SpidevOptions`
78
- Nix bumped to 0.22
89
- bitflags updated to 1.3
910
- 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
@@ -128,7 +128,7 @@ pub struct Spidev {
128128
/// Options that are not configured with one of the builder
129129
/// functions will not be modified in the kernel when
130130
/// `configure` is called.
131-
#[derive(Clone)]
131+
#[derive(Default, Clone)]
132132
pub struct SpidevOptions {
133133
pub bits_per_word: Option<u8>,
134134
pub max_speed_hz: Option<u32>,

0 commit comments

Comments
 (0)