Skip to content

Commit

Permalink
Fix compile error in specific feature combinations
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo1003 committed Apr 24, 2024
1 parent fd6b124 commit 5c5a7ce
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/serde.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
use crate::{parse_chrono, parse_std, parse_time};
#[cfg(all(feature = "chrono", feature = "serde"))]
use crate::parse_chrono;
#[cfg(all(feature = "time", feature = "serde"))]
use crate::parse_time;
use crate::parse_std;
use std::time::Duration;

#[cfg(all(feature = "chrono", feature = "serde"))]
Expand Down Expand Up @@ -160,7 +164,7 @@ mod tests {
);
}

#[cfg(feature = "serde")]
#[cfg(all(feature = "serde", feature = "chrono"))]
#[test]
fn test_deserialize_duration_chrono() {
use chrono::Duration;
Expand All @@ -177,7 +181,7 @@ mod tests {
);
}

#[cfg(feature = "serde")]
#[cfg(all(feature = "serde", feature = "chrono"))]
#[test]
fn test_deserialize_option_duration_chrono() {
use chrono::Duration;
Expand Down

0 comments on commit 5c5a7ce

Please sign in to comment.