Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scylla-cql: Use #[cfg(feature = "time")] for time related impl SerializeCql's #898

Merged
merged 2 commits into from Jan 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions scylla-cql/src/types/serialize/value.rs
Expand Up @@ -172,21 +172,21 @@ impl SerializeCql for NaiveTime {
<CqlTime as SerializeCql>::serialize(&cql_time, typ, writer)?
});
}
#[cfg(feature = "chrono")]
#[cfg(feature = "time")]
impl SerializeCql for time::Date {
impl_serialize_via_writer!(|me, typ, writer| {
exact_type_check!(typ, Date);
<CqlDate as SerializeCql>::serialize(&(*me).into(), typ, writer)?
});
}
#[cfg(feature = "chrono")]
#[cfg(feature = "time")]
impl SerializeCql for time::OffsetDateTime {
impl_serialize_via_writer!(|me, typ, writer| {
exact_type_check!(typ, Timestamp);
<CqlTimestamp as SerializeCql>::serialize(&(*me).into(), typ, writer)?
});
}
#[cfg(feature = "chrono")]
#[cfg(feature = "time")]
impl SerializeCql for time::Time {
impl_serialize_via_writer!(|me, typ, writer| {
exact_type_check!(typ, Time);
Expand Down