Skip to content

Commit 774e859

Browse files
committed
Rename the provider crate (#289)
Related to the ongoing discussion in #277. This PR updates the provider crate to `timezone_provider`, which seemed to be a general agreed upon name. So far it does not make any major decision on what is currently in the crate. The primary goal is to have the crate name in aligned with a go forward value so as to not block a new release.
1 parent 07f69bb commit 774e859

File tree

9 files changed

+33
-31
lines changed

9 files changed

+33
-31
lines changed

Cargo.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ exclude = [
2222
[workspace.dependencies]
2323
# Self
2424
temporal_rs = { version = "~0.0.6", path = ".", default-features = false }
25-
temporal_provider = { version = "~0.0.6", path = "./provider" }
25+
timezone_provider = { version = "~0.0.6", path = "./provider" }
2626

2727
# Dependencies
2828
tinystr = "0.8.1"
@@ -52,7 +52,6 @@ readme.workspace = true
5252
exclude.workspace = true
5353

5454
[dependencies]
55-
temporal_provider = { workspace = true, optional = true}
5655

5756
tinystr.workspace = true
5857
icu_calendar = { workspace = true, features = ["compiled_data"] }
@@ -68,6 +67,7 @@ log = { workspace = true, optional = true }
6867
tzif = { workspace = true, optional = true }
6968
jiff-tzdb = { workspace = true, optional = true }
7069
combine = { workspace = true, optional = true }
70+
timezone_provider = { workspace = true, optional = true}
7171

7272
# System time feature
7373
web-time = { workspace = true, optional = true }
@@ -78,7 +78,7 @@ default = ["sys"]
7878
log = ["dep:log"]
7979
compiled_data = ["tzdb"]
8080
sys = ["std", "dep:web-time", "dep:iana-time-zone"]
81-
tzdb = ["dep:tzif", "std", "dep:jiff-tzdb", "dep:combine", "dep:temporal_provider"]
81+
tzdb = ["dep:tzif", "std", "dep:jiff-tzdb", "dep:combine", "dep:timezone_provider"]
8282
std = []
8383

8484
[package.metadata.cargo-all-features]

bakeddata/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ publish = false
1313
[dependencies]
1414
databake = "0.2.0"
1515
serde_json = "1.0.140"
16-
temporal_provider = { workspace = true }
16+
timezone_provider = { workspace = true }

bakeddata/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::{
44
io::{self, BufWriter, Write},
55
path::Path,
66
};
7-
use temporal_provider::IanaIdentifierNormalizer;
7+
use timezone_provider::IanaIdentifierNormalizer;
88

99
trait BakedDataProvider {
1010
fn write_data(&self, data_path: &Path) -> io::Result<()>;
@@ -22,7 +22,7 @@ impl BakedDataProvider for IanaIdentifierNormalizer<'_> {
2222
#[macro_export]
2323
macro_rules! iana_normalizer_singleton {
2424
() => {
25-
pub const SINGLETON_IANA_NORMALIZER: &'static temporal_provider::IanaIdentifierNormalizer = &#baked;
25+
pub const SINGLETON_IANA_NORMALIZER: &'static timezone_provider::IanaIdentifierNormalizer = &#baked;
2626
}
2727
}
2828
};

provider/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "temporal_provider"
2+
name = "timezone_provider"
33
edition.workspace = true
44
version.workspace = true
55
rust-version.workspace = true

provider/src/data/iana_normalizer.rs.data

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

provider/src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
//! `temporal_provider` is a crate designed for data providers
2-
//! intended for `temporal_rs`
1+
//! Data providers for time zone data
2+
//!
3+
//! This crate aims to provide a variety of data providers
4+
//! for time zone data.
35
//!
46
57
mod tzdb;
68

79
pub use tzdb::{IanaDataError, IanaIdentifierNormalizer};
810

9-
/// A prelude of needed types for interacting with `temporal_provider` data.
11+
/// A prelude of needed types for interacting with `timezone_provider` data.
1012
pub mod prelude {
1113
pub use zerotrie;
1214
pub use zerovec;
@@ -16,7 +18,7 @@ include!("./data/mod.rs");
1618

1719
#[cfg(test)]
1820
mod tests {
19-
use crate as temporal_provider;
21+
use crate as timezone_provider;
2022
extern crate alloc;
2123

2224
iana_normalizer_singleton!();

provider/src/tzdb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! `temporal_provider` is the core data provider implementations for `temporal_rs`
1+
//! `timezone_provider` is the core data provider implementations for `temporal_rs`
22
33
// What are we even doing here? Why are providers needed?
44
//
@@ -24,7 +24,7 @@ use zerovec::{VarZeroVec, ZeroVec};
2424

2525
/// A data struct for IANA identifier normalization
2626
#[derive(PartialEq, Debug, Clone, yoke::Yokeable, serde::Serialize, databake::Bake)]
27-
#[databake(path = temporal_provider)]
27+
#[databake(path = timezone_provider)]
2828
#[derive(serde::Deserialize)]
2929
pub struct IanaIdentifierNormalizer<'data> {
3030
/// TZDB version

src/tzdb.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ use core::cell::RefCell;
3838

3939
use combine::Parser;
4040

41-
use temporal_provider::prelude::*;
41+
use timezone_provider::prelude::*;
4242

4343
use tzif::{
4444
self,
@@ -56,7 +56,7 @@ use crate::{
5656
utils, TemporalError, TemporalResult,
5757
};
5858

59-
temporal_provider::iana_normalizer_singleton!();
59+
timezone_provider::iana_normalizer_singleton!();
6060

6161
#[cfg(target_family = "unix")]
6262
const ZONEINFO_DIR: &str = "/usr/share/zoneinfo/";

0 commit comments

Comments
 (0)