Skip to content

Commit

Permalink
Bump Diplomat and use DiplomatStr[16] (unicode-org#4353)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Nov 28, 2023
1 parent 7ac0dcc commit afc612d
Show file tree
Hide file tree
Showing 108 changed files with 682 additions and 824 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ icu_benchmark_macros = { path = "tools/benchmark/macros" }

# The version here can either be a `version = ".."` spec or `git = "https://github.com/rust-diplomat/diplomat", rev = ".."`
# Diplomat must be published preceding a new ICU4X release but may use git versions in between
diplomat = { git = "https://github.com/rust-diplomat/diplomat.git", rev = "f545acf50629b6f2135adca374507b717a821cd8" }
diplomat-runtime = { git = "https://github.com/rust-diplomat/diplomat.git", rev = "f545acf50629b6f2135adca374507b717a821cd8" }
diplomat_core = { git = "https://github.com/rust-diplomat/diplomat.git", rev = "f545acf50629b6f2135adca374507b717a821cd8" }
diplomat-tool = { git = "https://github.com/rust-diplomat/diplomat.git", rev = "f545acf50629b6f2135adca374507b717a821cd8" }
diplomat = { git = "https://github.com/rust-diplomat/diplomat.git", rev = "04efb3cb53f853fd6fd560eb248940c59472f425" }
diplomat-runtime = { git = "https://github.com/rust-diplomat/diplomat.git", rev = "04efb3cb53f853fd6fd560eb248940c59472f425" }
diplomat_core = { git = "https://github.com/rust-diplomat/diplomat.git", rev = "04efb3cb53f853fd6fd560eb248940c59472f425" }
diplomat-tool = { git = "https://github.com/rust-diplomat/diplomat.git", rev = "04efb3cb53f853fd6fd560eb248940c59472f425" }

# Size optimized builds
[profile.release-opt-size]
Expand Down
7 changes: 6 additions & 1 deletion components/timezone/src/iana_ids.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,15 @@ impl<'a> IanaToBcp47MapperBorrowed<'a> {
///
/// [ECMAScript Temporal]: https://tc39.es/proposal-temporal/#sec-isavailabletimezonename
pub fn get(&self, iana_id: &str) -> Option<TimeZoneBcp47Id> {
self.get_bytes(iana_id.as_bytes())
}

#[doc(hidden)]
pub fn get_bytes(&self, iana_id: &[u8]) -> Option<TimeZoneBcp47Id> {
// The longest IANA name in CLDR appears to be "America/Argentina/ComodRivadavia"
// which is 32 characters long, so 48 should be plenty. Add a debug assertion
// just in case.
let name_for_lookup = match tinystr::TinyAsciiStr::<48>::from_str(iana_id) {
let name_for_lookup = match tinystr::TinyAsciiStr::<48>::from_bytes(iana_id) {
Ok(tinystr) => tinystr.to_ascii_lowercase(),
Err(tinystr::TinyStrError::TooLarge { .. }) => {
debug_assert!(false, "IANA string too long for lookup");
Expand Down
12 changes: 6 additions & 6 deletions ffi/capi/dart/package/lib/src/AnyCalendarKind.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions ffi/capi/dart/package/lib/src/Bcp47ToIanaMapper.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 27 additions & 12 deletions ffi/capi/dart/package/lib/src/Bidi.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions ffi/capi/dart/package/lib/src/CaseMapCloser.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit afc612d

Please sign in to comment.