Skip to content

Commit cb8b13c

Browse files
committed
A few more feature fixes
1 parent 9d9af9e commit cb8b13c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

ffi/diplomat/wasm/test/data-providers.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ test("use create_from_byte_slice to format a simple decimal", async t => {
1515
const bytes = new Uint8Array(nodeBuffer.buffer, nodeBuffer.byteOffset, nodeBuffer.length);
1616
const result = ICU4XDataProvider.create_from_byte_slice(bytes);
1717
t.assert(result.success);
18-
const format = ICU4XFixedDecimalFormat.try_new(locale, result.provider, ICU4XFixedDecimalFormatOptions.default()).fdf;
18+
19+
const format = ICU4XFixedDecimalFormat.try_new(locale, result.provider, ICU4XFixedDecimalFormatOptions.default());
20+
t.assert(format.success);
1921

2022
const decimal = ICU4XFixedDecimal.create(1234);
2123
decimal.multiply_pow10(-2);
2224

23-
t.is(format.format(decimal), "১২.৩৪");
25+
t.is(format.fdf.format(decimal), "১২.৩৪");
2426
});
2527

2628
test("fail to create from invalid buffer", t => {

provider/blob/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ include = [
2727
all-features = true
2828

2929
[dependencies]
30-
icu_provider = { version = "0.4", path = "../../provider/core", features = [] }
30+
icu_provider = { version = "0.4", path = "../../provider/core", features = ["deserialize_postcard_07"] }
3131
icu_locid = { version = "0.4", path = "../../components/locid", features = ["serde"] }
3232
serde = { version = "1.0", default-features = false, features = ["alloc"] }
3333
postcard = { version = "0.7.0", default-features = false }

provider/fs/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extra_features = [
3636
all-features = true
3737

3838
[dependencies]
39-
icu_provider = { version = "0.4", path = "../../provider/core" }
39+
icu_provider = { version = "0.4", path = "../../provider/core", features = ["serde"] }
4040
icu_locid = { version = "0.4", path = "../../components/locid", features = ["serde"] }
4141
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
4242
erased-serde = { version = "0.3", default-features = false, features = ["alloc"] }
@@ -61,7 +61,7 @@ criterion = "0.3.3"
6161
[features]
6262
# Enables JSON or Bincode data storage for deserialization
6363
deserialize_json = ["icu_provider/deserialize_json"]
64-
deserialize_bincode_1 = ["icu_provider/deserialize_bincode_1"]
64+
deserialize_bincode_1 = ["std", "icu_provider/deserialize_bincode_1"]
6565
# Enables the "export" module and FilesystemExporter
6666
export = ["static_assertions", "log", "std", "serde_json", "bincode", "icu_provider/serialize"]
6767
std = ["serde_json/std", "serde-json-core/std"]

0 commit comments

Comments
 (0)