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

make dep optional and resolve one fixme #182

Merged
merged 2 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions chrono-tz-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ documentation = "https://docs.rs/chrono-tz-build"

[features]
filter-by-regex = ["regex"]
case-insensitive = ["uncased", "phf/uncased"]
case-insensitive = ["uncased", "phf_shared/uncased"]
regex = ["dep:regex"]

[dependencies]
parse-zoneinfo = { version = "0.3" }
regex = { default-features = false, version = "1", optional = true }
phf = { version = "0.11", default-features = false }
phf_codegen = { version = "0.11", default-features = false }
uncased = { version = "0.9", optional = true, default-features = false }

# needed only to forward feature for uncased
phf_shared = { version = "0.11", default-features = false, optional = true }
3 changes: 0 additions & 3 deletions chrono-tz-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,7 @@ fn write_timezone_file(timezone_file: &mut File, table: &Table) -> io::Result<()
writeln!(
timezone_file,
"static TIMEZONES_UNCASED: ::phf::Map<&'static uncased::UncasedStr, Tz> = \n{};",
// FIXME(petrosagg): remove this once rust-phf/rust-phf#232 is released
map.build()
.to_string()
.replace("::std::mem::transmute", "::core::mem::transmute")
)?;
}

Expand Down
Loading