Skip to content

Commit

Permalink
feat: add support for chrono::NaiveDateTime (#125)
Browse files Browse the repository at this point in the history
Co-authored-by: Rob Ede <robjtede@icloud.com>
  • Loading branch information
tenuous-guidance and robjtede authored Sep 20, 2024
1 parent ddfae31 commit 889ad4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions confik/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

- Minimum supported Rust version (MSRV) is now 1.67 due to `toml_edit` dependency.
- Implement `Configuration` for [`chrono::NaiveDateTime`](https://docs.rs/chrono/0.4/chrono/naive/struct.NaiveDateTime.html)

## 0.11.7

Expand Down
6 changes: 5 additions & 1 deletion confik/src/third_party.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mod camino {

#[cfg(feature = "chrono")]
mod chrono {
use chrono::{DateTime, NaiveDate, NaiveTime, TimeZone};
use chrono::{DateTime, NaiveDate, NaiveDateTime, NaiveTime, TimeZone};
use serde::de::DeserializeOwned;

use crate::Configuration;
Expand All @@ -37,6 +37,10 @@ mod chrono {
type Builder = Option<Self>;
}

impl Configuration for NaiveDateTime {
type Builder = Option<Self>;
}

#[cfg(test)]
mod tests {
use crate::TomlSource;
Expand Down

0 comments on commit 889ad4f

Please # to comment.