Skip to content

Commit

Permalink
Revert "builtin features instead"
Browse files Browse the repository at this point in the history
This reverts commit 89f6330.
  • Loading branch information
tisonkun committed Oct 11, 2024
1 parent 89f6330 commit 309cc8d
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 84 deletions.
15 changes: 5 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ rust-version = "1.70"

[workspace]
members = [
"jiff-cli",
"jiff-tzdb",
"jiff-tzdb-platform",
"examples/*",
"jiff-cli",
"jiff-tzdb",
"jiff-tzdb-platform",
"sqlx-jiff",
"examples/*",
]

# Features are documented in the "Crate features" section of the crate docs:
Expand Down Expand Up @@ -74,17 +75,11 @@ tzdb-zoneinfo = ["std"]
# (This is the same dependency setup that the `getrandom` crate uses.)
js = ["dep:wasm-bindgen", "dep:js-sys"]

# This enables the integrations with the `sqlx` crate.
sqlx = ["dep:sqlx"]
sqlx-postgres = ["sqlx", "sqlx/postgres"]

[dependencies]
jiff-tzdb = { version = "0.1.1", path = "jiff-tzdb", optional = true }
log = { version = "0.4.21", optional = true }
serde = { version = "1.0.203", optional = true }

sqlx = { version = "0.8.2", optional = true }

# Note that the `cfg` gate for the `tzdb-bundle-platform` must repeat the
# target gate on this dependency. The intent is that `tzdb-bundle-platform`
# is enabled by default, but that the `tzdb-bundle-platform` crate is only
Expand Down
21 changes: 21 additions & 0 deletions sqlx-jiff/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "sqlx-jiff"
version = "0.1.0"
license = "Unlicense OR MIT"
homepage = "https://github.com/BurntSushi/jiff/tree/master/sqlx-jiff"
repository = "https://github.com/BurntSushi/jiff"
documentation = "https://docs.rs/sqlx-jiff"
description = "Integration to use jiff structs for datetime types in sqlx."
categories = ["date-and-time"]
keywords = ["date", "time", "temporal", "zone", "iana"]
workspace = ".."
edition = "2021"
rust-version = "1.70"

[features]
default = []
postgres = ["sqlx/postgres"]

[dependencies]
jiff = { path = ".." }
sqlx = { version = "0.8.2" }
2 changes: 2 additions & 0 deletions sqlx-jiff/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#[cfg(feature = "postgres")]
mod postgres;
Empty file added sqlx-jiff/src/postgres.rs
Empty file.
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,6 @@ pub mod tz;
mod util;
mod zoned;

#[cfg(feature = "sqlx")]
mod sqlx_impls;

/// Longer form documentation for Jiff.
pub mod _documentation {
#[doc = include_str!("../COMPARE.md")]
Expand Down
2 changes: 0 additions & 2 deletions src/sqlx_impls/mod.rs

This file was deleted.

69 changes: 0 additions & 69 deletions src/sqlx_impls/postgres.rs

This file was deleted.

0 comments on commit 309cc8d

Please sign in to comment.