Skip to content

Commit 93b5910

Browse files
authored
chrono: 0.4.20 -> 0.4.23
1 parent 2653da9 commit 93b5910

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88
### Changed
9-
- Updated minimum `chrono` version to `0.4.20` to satisfy `cargo-audit`.
9+
- Updated minimum `chrono` version to `0.4.23` to satisfy `cargo-audit`.
1010

1111
## [0.6.1] - 2022-08-01
1212
### Fixed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hal/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ rt = ["stm32wl/rt", "cortex-m-rt"]
2727

2828
[dependencies]
2929
cfg-if = "1"
30-
chrono = { version = "0.4.20", default-features = false, optional = true }
30+
chrono = { version = "0.4.23", default-features = false, optional = true }
3131
cortex-m = "0.7.2"
3232
cortex-m-rt = { version = "0.7", optional = true }
3333
defmt = { version = "0.3", optional = true }

hal/src/rtc/alarm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ impl From<chrono::NaiveTime> for Alarm {
5757

5858
impl From<Alarm> for chrono::NaiveTime {
5959
fn from(alarm: Alarm) -> Self {
60-
Self::from_hms(
60+
unwrap!(Self::from_hms_opt(
6161
alarm.hours().into(),
6262
alarm.minutes().into(),
6363
alarm.seconds().into(),
64-
)
64+
))
6565
}
6666
}
6767

@@ -524,7 +524,7 @@ mod tests {
524524

525525
#[test]
526526
fn chrono_convert() {
527-
let ndt: NaiveTime = NaiveTime::from_hms(12, 34, 56);
527+
let ndt: NaiveTime = NaiveTime::from_hms_opt(12, 34, 56).unwrap();
528528
let alarm: Alarm = ndt.into();
529529
assert_eq!(alarm.hours(), 12);
530530
assert_eq!(alarm.minutes(), 34);

0 commit comments

Comments
 (0)