Skip to content

Commit 2faeba0

Browse files
authored
Merge pull request #898 from oeb25/misplaced-chrono-feature
scylla-cql: Use `#[cfg(feature = "time")]` for `time` related `impl SerializeCql`'s
2 parents 8263c53 + c23cad4 commit 2faeba0

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/rust.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ jobs:
3434
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features ""
3535
- name: Cargo check with all serialization features
3636
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "full-serialization"
37+
- name: Cargo check with secret feature
38+
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "secret"
39+
- name: Cargo check with chrono feature
40+
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "chrono"
41+
- name: Cargo check with time feature
42+
run: cargo check --all-targets --manifest-path "scylla/Cargo.toml" --features "time"
3743
- name: Build scylla-cql
3844
run: cargo build --verbose --all-targets --manifest-path "scylla-cql/Cargo.toml" --features "full-serialization"
3945
- name: Build

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)