Skip to content

Commit 5714db1

Browse files
committed
scylla-cql: Use #[cfg(feature = "time")] for time related impl SerializeCql's
Fixes #897
1 parent 4a4fd0e commit 5714db1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scylla-cql/src/types/serialize/value.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,21 +172,21 @@ impl SerializeCql for NaiveTime {
172172
<CqlTime as SerializeCql>::serialize(&cql_time, typ, writer)?
173173
});
174174
}
175-
#[cfg(feature = "chrono")]
175+
#[cfg(feature = "time")]
176176
impl SerializeCql for time::Date {
177177
impl_serialize_via_writer!(|me, typ, writer| {
178178
exact_type_check!(typ, Date);
179179
<CqlDate as SerializeCql>::serialize(&(*me).into(), typ, writer)?
180180
});
181181
}
182-
#[cfg(feature = "chrono")]
182+
#[cfg(feature = "time")]
183183
impl SerializeCql for time::OffsetDateTime {
184184
impl_serialize_via_writer!(|me, typ, writer| {
185185
exact_type_check!(typ, Timestamp);
186186
<CqlTimestamp as SerializeCql>::serialize(&(*me).into(), typ, writer)?
187187
});
188188
}
189-
#[cfg(feature = "chrono")]
189+
#[cfg(feature = "time")]
190190
impl SerializeCql for time::Time {
191191
impl_serialize_via_writer!(|me, typ, writer| {
192192
exact_type_check!(typ, Time);

0 commit comments

Comments
 (0)