chronotope / chrono

Date and time library for Rust
Other
3.3k stars 523 forks source link

No serde impls for Months #1602

Open MrFaul opened 2 months ago

MrFaul commented 2 months ago
error[E0277]: the trait bound `chrono::Months: _::_serde::Serialize` is not satisfied
    --> src\main.rs:5:10
     |
5    | #[derive(Serialize, Deserialize, Debug)]
     |          ^^^^^^^^^ the trait `_::_serde::Serialize` is not implemented for `chrono::Months`

What the compiler said... I'm probably the only person in the world using that enum in that way 😅

djc commented 2 months ago

This isn't even an enum... It is fairly niche and I think adding the Months type may have been a mistake so I'm not sure we'll want to add more API surface to it.