Fixing format, removing duplicate NaiveDate
@@ -64,6 +64,13 @@ impl_any_decode!(String);
not(feature = "mssql")
))]
impl_any_type!(chrono::NaiveDate);
+#[cfg(all(
+ feature = "chrono",
+ any(feature = "mysql", feature = "postgres"),
+ not(any(feature = "mssql", feature = "sqlite"))
+))]
+impl_any_type!(chrono::NaiveTime);
+
#[cfg(all(
feature = "chrono",
any(feature = "mysql", feature = "sqlite", feature = "postgres"),
@@ -76,18 +83,6 @@ impl_any_type!(chrono::DateTime<chrono::offset::Utc>);
not(any(feature = "mysql", feature = "mssql"))
))]
impl_any_type!(chrono::DateTime<chrono::offset::Local>);
-#[cfg(all(
- feature = "chrono",
- any(feature = "mysql", feature = "postgres"),
- not(any(feature = "mssql", feature = "sqlite"))
-))]
-impl_any_type!(chrono::NaiveDate);
-#[cfg(all(
- feature = "chrono",
- any(feature = "mysql", feature = "postgres"),
- not(any(feature = "mssql", feature = "sqlite"))
-))]
-impl_any_type!(chrono::NaiveTime);
// Encode
#[cfg(all(
@@ -96,6 +91,12 @@ impl_any_type!(chrono::NaiveTime);
not(feature = "mssql")
))]
impl_any_encode!(chrono::NaiveDate);
+#[cfg(all(
+ feature = "chrono",
+ any(feature = "mysql", feature = "postgres"),
+ not(any(feature = "mssql", feature = "sqlite"))
+))]
+impl_any_encode!(chrono::NaiveTime);
#[cfg(all(
feature = "chrono",
any(feature = "mysql", feature = "sqlite", feature = "postgres"),
@@ -108,18 +109,6 @@ impl_any_encode!(chrono::DateTime<chrono::offset::Utc>);
not(any(feature = "mysql", feature = "mssql"))
))]
impl_any_encode!(chrono::DateTime<chrono::offset::Local>);
-#[cfg(all(
- feature = "chrono",
- any(feature = "mysql", feature = "postgres"),
- not(any(feature = "mssql", feature = "sqlite"))
-))]
-impl_any_encode!(chrono::NaiveDate);
-#[cfg(all(
- feature = "chrono",
- any(feature = "mysql", feature = "postgres"),
- not(any(feature = "mssql", feature = "sqlite"))
-))]
-impl_any_encode!(chrono::NaiveTime);
// Decode
#[cfg(all(
@@ -128,6 +117,12 @@ impl_any_encode!(chrono::NaiveTime);
not(feature = "mssql")
))]
impl_any_decode!(chrono::NaiveDate);
+#[cfg(all(
+ feature = "chrono",
+ any(feature = "mysql", feature = "postgres"),
+ not(any(feature = "mssql", feature = "sqlite"))
+))]
+impl_any_decode!(chrono::NaiveTime);
#[cfg(all(
feature = "chrono",
any(feature = "mysql", feature = "sqlite", feature = "postgres"),
@@ -140,15 +135,3 @@ impl_any_decode!(chrono::DateTime<chrono::offset::Utc>);
not(any(feature = "mysql", feature = "mssql"))
))]
impl_any_decode!(chrono::DateTime<chrono::offset::Local>);
-#[cfg(all(
- feature = "chrono",
- any(feature = "mysql", feature = "postgres"),
- not(any(feature = "mssql", feature = "sqlite"))
-))]
-impl_any_decode!(chrono::NaiveDate);
-#[cfg(all(
- feature = "chrono",
- any(feature = "mysql", feature = "postgres"),
- not(any(feature = "mssql", feature = "sqlite"))
-))]
-impl_any_decode!(chrono::NaiveTime);
