Skip to content

Commit 4e654c1

Browse files
committed
Update to ICU4X 2.0 release
1 parent 8e5dbf8 commit 4e654c1

File tree

4 files changed

+65
-92
lines changed

4 files changed

+65
-92
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "idna_adapter"
3-
version = "1.2.1-beta.1"
4-
rust-version = "1.71.1" # Match ICU4X 2.0
3+
version = "1.2.1"
4+
rust-version = "1.82" # Match ICU4X 2.0
55
edition = "2021"
66
license = "Apache-2.0 OR MIT"
77
authors = ["The rust-url developers"]
@@ -14,8 +14,8 @@ homepage = "https://docs.rs/crate/idna_adapter/latest" # README link
1414
repository = "https://github.com/hsivonen/idna_adapter"
1515

1616
[dependencies]
17-
icu_normalizer = "=2.0.0-beta1"
18-
icu_properties = "=2.0.0-beta1"
17+
icu_normalizer = "2"
18+
icu_properties = "2"
1919

2020
[features]
2121
compiled_data = ["icu_normalizer/compiled_data", "icu_properties/compiled_data"]

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ It is generally a good idea to refer to the [README of the latest version](https
1010

1111
## ICU4X as the default
1212

13-
If you take no action, Cargo will choose the 1.2.x version stream i.e. ICU4X.
13+
If you take no action, Cargo will choose the 1.2.x version stream i.e. latest ICU4X (2.0 as of writing).
1414

15-
### Opting to use ICU4X 2.0.0-beta1
15+
### Opting to use ICU4X 1.x
1616

17-
To choose ICU4X 2.0.0-beta1, run `cargo update -p idna_adapter --precise 1.2.1-beta.1` in the top-level directory of your application.
17+
To choose ICU4X 1.x, run `cargo update -p idna_adapter --precise 1.2.0` in the top-level directory of your application.
18+
19+
This may make sense if your application has other ways of depending on ICU4X 1.x, and you are not ready to update those dependencies to ICU4X 2.0 just yet.
1820

1921
## Opting to use unicode-rs
2022

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use icu_properties::CodePointMapDataBorrowed;
2929

3030
/// Turns a joining type into a mask for comparing with multiple type at once.
3131
const fn joining_type_to_mask(jt: icu_properties::props::JoiningType) -> u32 {
32-
1u32 << jt.0
32+
1u32 << jt.to_icu4c_value()
3333
}
3434

3535
/// Mask for checking for both left and dual joining.
@@ -46,7 +46,7 @@ pub const RIGHT_OR_DUAL_JOINING_MASK: JoiningTypeMask = JoiningTypeMask(
4646

4747
/// Turns a bidi class into a mask for comparing with multiple classes at once.
4848
const fn bidi_class_to_mask(bc: icu_properties::props::BidiClass) -> u32 {
49-
1u32 << bc.0
49+
1u32 << bc.to_icu4c_value()
5050
}
5151

5252
/// Mask for checking if the domain is a bidi domain.

0 commit comments

Comments
 (0)