Skip to content

Commit 10b801c

Browse files
authored
Add missing must_use to SleepCfg::set_startup (#376)
1 parent d975e02 commit 10b801c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- Updated minimum `chrono` version to `0.4.23` to satisfy `cargo-audit`.
1212
- Changed minimum supported rust version from 1.60 to 1.62.
1313

14+
### Fixed
15+
- Added a missing `must_use` in `SleepCfg::set_startup`.
16+
1417
## [0.6.1] - 2022-08-01
1518
### Fixed
1619
- Fixed undefined behavior in SPI full duplex RX DMA transfers.

hal/src/subghz/sleep_cfg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ impl SleepCfg {
6060
/// # assert_eq!(u8::from(SLEEP_CFG), 0b001);
6161
/// # assert_eq!(u8::from(SLEEP_CFG.set_startup(Startup::Warm)), 0b101);
6262
/// ```
63+
#[must_use = "set_startup returns a modified SleepCfg"]
6364
pub const fn set_startup(mut self, startup: Startup) -> SleepCfg {
6465
if startup as u8 == 1 {
6566
self.0 |= 1 << 2

0 commit comments

Comments
 (0)