Skip to content

Commit f81d058

Browse files
committed
Remove unnecessary feature flag jiff-tz
1 parent 750f366 commit f81d058

File tree

5 files changed

+13
-19
lines changed

5 files changed

+13
-19
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ jobs:
108108
- { feature: chrono-tz, crate: juniper }
109109
- { feature: expose-test-schema, crate: juniper }
110110
- { feature: jiff, crate: juniper }
111-
- { feature: jiff-tz, crate: juniper }
112111
- { feature: rust_decimal, crate: juniper }
113112
- { feature: schema-language, crate: juniper }
114113
- { feature: time, crate: juniper }

book/src/types/scalars.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,8 +400,9 @@ mod date_scalar {
400400
| [`jiff::civil::Time`] | [`LocalTime`] | [`jiff`] |
401401
| [`jiff::civil::DateTime`] | [`LocalDateTime`] | [`jiff`] |
402402
| [`jiff::Timestamp`] | [`DateTime`] | [`jiff`] |
403+
| [`jiff::Zoned`] | `ZonedDateTime` | [`jiff`] |
404+
| [`jiff::tz::TimeZone`] | [`TimeZone`] | [`jiff`] |
403405
| [`jiff::Span`] | [`Duration`] | [`jiff`] |
404-
| [`jiff::Zoned`] | `ZonedDateTime` | `jiff-tz` |
405406
| [`time::Date`] | [`LocalDate`] | [`time`] |
406407
| [`time::Time`] | [`LocalTime`] | [`time`] |
407408
| [`time::PrimitiveDateTime`] | [`LocalDateTime`] | [`time`] |
@@ -435,6 +436,7 @@ mod date_scalar {
435436
[`jiff::civil::Time`]: https://docs.rs/jiff/latest/jiff/civil/struct.Time.html
436437
[`jiff::Span`]: https://docs.rs/jiff/latest/jiff/struct.Span.html
437438
[`jiff::Timestamp`]: https://docs.rs/jiff/latest/jiff/struct.Timestamp.html
439+
[`jiff::tz::TimeZone`]: https://docs.rs/jiff/latest/jiff/tz/struct.TimeZone.html
438440
[`jiff::Zoned`]: https://docs.rs/jiff/latest/jiff/struct.Zoned.html
439441
[`LocalDate`]: https://graphql-scalars.dev/docs/scalars/local-date
440442
[`LocalDateTime`]: https://graphql-scalars.dev/docs/scalars/local-date-time

juniper/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ All user visible changes to `juniper` crate will be documented in this file. Thi
3434

3535
### Added
3636

37-
- [`jiff` crate] integration behind `jiff`/`jiff-tz` [Cargo feature]: ([#1271], [#1278], [#1270])
37+
- [`jiff` crate] integration behind `jiff` [Cargo feature]: ([#1271], [#1278], [#1270])
3838
- `jiff::civil::Date` as `LocalDate` scalar.
3939
- `jiff::civil::Time` as `LocalTime` scalar.
4040
- `jiff::civil::DateTime` as `LocalDateTime` scalar. ([#1275])
@@ -50,11 +50,11 @@ All user visible changes to `juniper` crate will be documented in this file. Thi
5050
[#1252]: /../../pull/1252
5151
[#1270]: /../../issues/1270
5252
[#1271]: /../../pull/1271
53-
[#1278]: /../../pull/1278
5453
[#1272]: /../../pull/1272
5554
[#1274]: /../../pull/1274
5655
[#1275]: /../../pull/1275
5756
[#1277]: /../../pull/1277
57+
[#1278]: /../../pull/1278
5858

5959

6060

juniper/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ chrono-clock = ["chrono", "chrono/clock"]
3434
chrono-tz = ["dep:chrono-tz", "dep:regex"]
3535
expose-test-schema = ["dep:anyhow", "dep:serde_json"]
3636
jiff = ["dep:jiff"]
37-
jiff-tz = ["jiff", "jiff/std"]
3837
js = ["chrono?/wasmbind", "time?/wasm-bindgen", "uuid?/js"]
3938
rust_decimal = ["dep:rust_decimal"]
4039
schema-language = ["dep:graphql-parser", "dep:void"]
@@ -54,7 +53,7 @@ fnv = "1.0.5"
5453
futures = { version = "0.3.22", features = ["alloc"], default-features = false }
5554
graphql-parser = { version = "0.4", optional = true }
5655
indexmap = { version = "2.0", features = ["serde"] }
57-
jiff = { version = "0.1.5", features = ["alloc"], default-features = false, optional = true }
56+
jiff = { version = "0.1.5", features = ["alloc", "std"], default-features = false, optional = true }
5857
juniper_codegen = { version = "0.16.0", path = "../juniper_codegen" }
5958
rust_decimal = { version = "1.20", default-features = false, optional = true }
6059
ryu = { version = "1.0", optional = true }

juniper/src/integrations/jiff.rs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
//! | [`civil::DateTime`] | `yyyy-MM-ddTHH:mm:ss` | [`LocalDateTime`][s3] |
1010
//! | [`Timestamp`] | [RFC 3339] string | [`DateTime`][s4] |
1111
//! | [`Zoned`][^1] | [RFC 9557] string | `ZonedDateTime` |
12-
//! | [`tz::TimeZone`][^1] | [IANA database][1] | [`TimeZone`][s6] |
13-
//! | [`Span`] | [ISO 8601] duration | [`Duration`][s5] |
12+
//! | [`tz::TimeZone`][^1] | [IANA database][1] | [`TimeZone`][s5] |
13+
//! | [`Span`] | [ISO 8601] duration | [`Duration`][s6] |
1414
//!
15-
//! [^1]: For these, feature flag `jiff-tz` must be enabled and crate [`jiff`] must be installed
16-
//! with a feature flag that provides access to the Time Zone Database (e.g. by using the crate's
17-
//! default feature flags). See [`jiff` time zone features][tz] for details.
15+
//! [^1]: For these, crate [`jiff`] must be installed with a feature flag that provides access to
16+
//! the Time Zone Database (e.g. by using the crate's default feature flags). See [`jiff` time zone
17+
//! features][tz] for details.
1818
//!
1919
//! [`civil::Date`]: jiff::civil::Date
2020
//! [`civil::DateTime`]: jiff::civil::DateTime
@@ -30,8 +30,8 @@
3030
//! [s2]: https://graphql-scalars.dev/docs/scalars/local-time
3131
//! [s3]: https://graphql-scalars.dev/docs/scalars/local-date-time
3232
//! [s4]: https://graphql-scalars.dev/docs/scalars/date-time
33-
//! [s5]: https://graphql-scalars.dev/docs/scalars/duration
34-
//! [s6]: https://graphql-scalars.dev/docs/scalars/time-zone
33+
//! [s5]: https://graphql-scalars.dev/docs/scalars/time-zone
34+
//! [s6]: https://graphql-scalars.dev/docs/scalars/duration
3535
//! [tz]: https://docs.rs/jiff/latest/jiff/index.html#time-zone-features
3636
//! [1]: http://www.iana.org/time-zones
3737
@@ -262,14 +262,12 @@ mod date_time {
262262
/// [3]: https://docs.rs/jiff/latest/jiff/struct.Timestamp.html
263263
/// [4]: https://docs.rs/jiff/latest/jiff/civil/struct.DateTime.html
264264
/// [5]: https://docs.rs/jiff/latest/jiff/tz/struct.TimeZone.html
265-
#[cfg(feature = "jiff-tz")]
266265
#[graphql_scalar(
267266
with = zoned_date_time,
268267
parse_token(String),
269268
)]
270269
pub type ZonedDateTime = jiff::Zoned;
271270

272-
#[cfg(feature = "jiff-tz")]
273271
mod zoned_date_time {
274272
use std::str::FromStr as _;
275273

@@ -346,15 +344,13 @@ mod duration {
346344
///
347345
/// [1]: http://www.iana.org/time-zones
348346
/// [2]: https://docs.rs/jiff/latest/jiff/tz/struct.TimeZone.html
349-
#[cfg(feature = "jiff-tz")]
350347
#[graphql_scalar(
351348
with = time_zone,
352349
parse_token(String),
353350
specified_by_url = "https://graphql-scalars.dev/docs/scalars/time-zone",
354351
)]
355352
pub type TimeZone = jiff::tz::TimeZone;
356353

357-
#[cfg(feature = "jiff-tz")]
358354
mod time_zone {
359355
use super::*;
360356

@@ -737,7 +733,6 @@ mod date_time_test {
737733
}
738734
}
739735

740-
#[cfg(feature = "jiff-tz")]
741736
#[cfg(test)]
742737
mod zoned_date_time_test {
743738
use jiff::{civil, tz, tz::TimeZone};
@@ -1019,7 +1014,6 @@ mod duration_test {
10191014
}
10201015
}
10211016

1022-
#[cfg(feature = "jiff-tz")]
10231017
#[cfg(test)]
10241018
mod time_zone_test {
10251019
use jiff::tz;

0 commit comments

Comments
 (0)