summaryrefslogtreecommitdiffstats
path: root/vendor/icu_locid
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/icu_locid')
-rw-r--r--vendor/icu_locid/.cargo-checksum.json2
-rw-r--r--vendor/icu_locid/Cargo.lock267
-rw-r--r--vendor/icu_locid/Cargo.toml35
-rw-r--r--vendor/icu_locid/LICENSE79
-rw-r--r--vendor/icu_locid/README.md7
-rw-r--r--vendor/icu_locid/benches/iai_langid.rs4
-rw-r--r--vendor/icu_locid/src/extensions/other/mod.rs14
-rw-r--r--vendor/icu_locid/src/extensions/other/subtag.rs5
-rw-r--r--vendor/icu_locid/src/extensions/private/mod.rs16
-rw-r--r--vendor/icu_locid/src/extensions/private/other.rs3
-rw-r--r--vendor/icu_locid/src/extensions/transform/fields.rs23
-rw-r--r--vendor/icu_locid/src/extensions/transform/key.rs3
-rw-r--r--vendor/icu_locid/src/extensions/transform/mod.rs29
-rw-r--r--vendor/icu_locid/src/extensions/transform/value.rs20
-rw-r--r--vendor/icu_locid/src/extensions/unicode/attribute.rs6
-rw-r--r--vendor/icu_locid/src/extensions/unicode/attributes.rs12
-rw-r--r--vendor/icu_locid/src/extensions/unicode/key.rs3
-rw-r--r--vendor/icu_locid/src/extensions/unicode/keywords.rs40
-rw-r--r--vendor/icu_locid/src/extensions/unicode/mod.rs42
-rw-r--r--vendor/icu_locid/src/extensions/unicode/value.rs24
-rw-r--r--vendor/icu_locid/src/helpers.rs127
-rw-r--r--vendor/icu_locid/src/langid.rs26
-rw-r--r--vendor/icu_locid/src/lib.rs4
-rw-r--r--vendor/icu_locid/src/locale.rs28
-rw-r--r--vendor/icu_locid/src/parser/langid.rs6
-rw-r--r--vendor/icu_locid/src/subtags/language.rs7
-rw-r--r--vendor/icu_locid/src/subtags/mod.rs12
-rw-r--r--vendor/icu_locid/src/subtags/region.rs5
-rw-r--r--vendor/icu_locid/src/subtags/script.rs5
-rw-r--r--vendor/icu_locid/src/subtags/variant.rs5
-rw-r--r--vendor/icu_locid/src/subtags/variants.rs16
-rw-r--r--vendor/icu_locid/src/zerovec.rs4
32 files changed, 469 insertions, 410 deletions
diff --git a/vendor/icu_locid/.cargo-checksum.json b/vendor/icu_locid/.cargo-checksum.json
index 86c76b889..5013ff2a3 100644
--- a/vendor/icu_locid/.cargo-checksum.json
+++ b/vendor/icu_locid/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.lock":"1aa9f21333d579ccbdf71478538b586518faa9d7f73f7ba8049649f5d4e33b43","Cargo.toml":"d4d6c83d31deeb379ed08f9340dd71e9726ecaa8e89e55b01254fed5acdee859","LICENSE":"4ad7541d66a407234e2c84902124cef325c29f3e966353efdb800bedb8b8da21","README.md":"16472983782c836d9e97b4df4754baab7bb247d0a945d1a97cafb3210e951d8f","benches/fixtures/langid.json":"373c11527653c63c685c9e229a8de5ae2b557c25b686a9d891c59e1f603232d8","benches/fixtures/locale.json":"669b19db933094290a45bf856559920f4e92401072e364ac82c482119dc9233a","benches/fixtures/mod.rs":"9a9671eddcf38a6faa10cb814949f8abc15d89f5e70f3ad6f684f1bc3ffe72ea","benches/fixtures/subtags.json":"28be3a639e452d713e807d5779b6819e06277e2dbbf67801ef34964fb9b074b6","benches/helpers/macros.rs":"bba0945a826bc083156bc302507c48c0c99c4d965e2a84352644d768591b0339","benches/helpers/mod.rs":"c98167d866fdb7f66c8cab41e8d57b5aab9e9707dfc66c37ef136e088dac6fef","benches/iai_langid.rs":"7984d12b78a0e2ecfa1eac74ccf7310627285de821c13fab2fe000f0e961a136","benches/langid.rs":"4e3d307d48fd9071308a567a0ef927b229814978abd2ba29f57c65edd51f38e4","benches/locale.rs":"b8d5b1e3f8b5578c549a5149229656fb60de26b76a1bf66b6c1abce75042d674","benches/subtags.rs":"e7e80dabaf31bf031779456614f139cafcdadb805986e71b49133ac964928432","examples/filter_langids.rs":"e000b860432b1646c74709177e4e4df1cfdc9620f41a677d15a5016bd7eb9b29","examples/syntatically_canonicalize_locales.rs":"49184e6e52e2264c61a479c0df88c01e7f7079f3da991445faecca3844594079","src/databake.rs":"894d0f73836d99915c5726d8984e7833498e841e2985cedfd5893aeb2bdcc958","src/extensions/mod.rs":"684cb51f3edc0385f6f7703e81a83c3455bd035d0016bd8e9024b26546037cd1","src/extensions/other/mod.rs":"ee377c2eeaa6b622a2c80807bffdd307800030fe2ec8a99a9729bdde45452635","src/extensions/other/subtag.rs":"431d27a0a5adca7d56c7ea3a6de2a0412e1e14ad2dd8a8e09a548849984b84b6","src/extensions/private/mod.rs":"5d53d32adb79386416b6eb4a9de218423f3bee4000e96e4899b78462f609531c","src/extensions/private/other.rs":"586fd24398e78c5fda0afdb98de28a6467afd2d702683daf5dfab2a6c45af1e9","src/extensions/transform/fields.rs":"9221478ce7565738bb27951a6be25b3ebc5c11d63afb2ca744fd4c587d155e9b","src/extensions/transform/key.rs":"53e8c9ce13f00f678c2322855cc1d90afd91cd33a2af3758d098b7bbcc7090e5","src/extensions/transform/mod.rs":"111ebf59ad6cd9a09a8eb84367a0053ff03fff8329f07310131784a457d07b61","src/extensions/transform/value.rs":"577b642b32f7a74e98ba5bee8e30700021c8b0e6da63538398aaf95d13edfd65","src/extensions/unicode/attribute.rs":"d558a193b72f54cdb03afe8e023a145ac74832c8416ca55401cd417ebba2431c","src/extensions/unicode/attributes.rs":"ddc0361968151e28cc1e6a3d91056a0f71f2c42f22dacecd339aaa67dfdcf899","src/extensions/unicode/key.rs":"6c8694527079c5dd5f03f8e85f23ae6b5aa4b47899d1047036960e8400dca7de","src/extensions/unicode/keywords.rs":"782ce7de79b4151b072ea263d1c614e0a14e162043345eead6691d18b9de2092","src/extensions/unicode/mod.rs":"e066cbdabf567a40c777428d071e2e82389a043bd552bc1e83202401c86e0b2e","src/extensions/unicode/value.rs":"786ac19494618a3d45e6c0d0f85311c57812ba0e7a286a2ea903c3d358811e47","src/helpers.rs":"aae44d20013596d872d99e9db811f0dede093cc2d33d52104e11f45897185490","src/langid.rs":"314ef5d6764e35d5a30bd53e43a8d547c81fe7ee875fe52e54076215a89a64f1","src/lib.rs":"ba7bec8f041418942ccc36693d26c733d18d5d30dc06355c86870ca52b1b4a33","src/locale.rs":"bb59685345580711b9b1510a99db64f14080fbc176a461d2a6322ffda1bdb96c","src/macros.rs":"f7154fc103ea1120a55bb5898540b20df80de6eec42e70ce15f339d997f2bf52","src/ordering.rs":"d76c6f26ffb5eb1e24646b70ce532985af326c46c488abda52c89074387f1dcc","src/parser/errors.rs":"8af937e67d197272c0f4806cc40cb191c878085b8687f987e358ee01ac2b5004","src/parser/langid.rs":"749ac36945e7b5e24cbc82f04900f10f770fc24f7ce007af4c3be7a325ccc631","src/parser/locale.rs":"075c74803891894ad50bbedc69366931b8e76c0992b3caa1a5632f0a6816ccfd","src/parser/mod.rs":"5182392624876a419b1469d135d175aba680bb13d14e4f6ea0cfc4e071fbc743","src/serde.rs":"06e940e4f2d15f02d313b4e2b233aea3e74c93c6c43076f5ffe52d49c133608f","src/subtags/language.rs":"2ebc98952bd4a6b4077c77da1895225faacc17020af8a47675b8b41b05b9e7eb","src/subtags/mod.rs":"0257f746ed368ea3fa675054c9e7e40d972ec31cd7cc525be655a16a83c9d17b","src/subtags/region.rs":"4f4120f4910d0a4496f29c193d00313e71be4c646867d97ebd0e9a7438693847","src/subtags/script.rs":"6b1a68783cb90409bdd39b0184dfb2cb1c302fdee7202e3b6f7c7c8941bc7dfe","src/subtags/variant.rs":"956f1ea3d98172b6ead333411f010cf4e84404584a3051cb775d148d79beb4f8","src/subtags/variants.rs":"d312ec8994f25d0c0285f71f4bcdff5a06bdcfa45da3e3db31478d6f0293c741","src/zerovec.rs":"9d01a235d18296fbf0c2e89d188459e9446df0e63aaedc7e150165604af885b9","tests/fixtures/canonicalize.json":"9f2b7cbef72c24944cd4dc50de368c6e3ef69949f29c9ce1aa8807de767a4d0a","tests/fixtures/invalid-extensions.json":"4b7888006360b216030597257de8c301e22877e75216818967bbd8c83b6dbb0b","tests/fixtures/invalid.json":"5247849a6eb805619b8e70254c855227f7bdaf71431b071c91c6cc378ae9766e","tests/fixtures/langid.json":"960fd01722217ef1ea9077e2e0821d7089fe318a241bd7fb7918f50bf8f3f5c3","tests/fixtures/locale.json":"8606e0569fc6ea0e50a1fecb9295b911fbef7d8dbfde3c585476284a751baccf","tests/fixtures/mod.rs":"aea619960540b92199345cbd20ff03d2cb451aa2ce9aa6cf7915223ee9f812a3","tests/helpers/mod.rs":"d3bf59e7eed6230f340bef6c87a7b8de3a387ec391f60afc1b15a0d001cbfb67","tests/langid.rs":"82da0497c4b7d7c5d416ddb96bad0d13d4e51b735b5ed3164a25861de28e2118","tests/locale.rs":"bfbb137e6183e71e6e05076fd3b1caea98a70e69992c8626bb8f316eebc3a23c"},"package":"3003f85dccfc0e238ff567693248c59153a46f4e6125ba4020b973cef4d1d335"} \ No newline at end of file
+{"files":{"Cargo.lock":"6214b473d2f714c579f3bb23814b478fb419ee5318c614e7ea77ee2b3c8c8ae3","Cargo.toml":"b73d1db3dab5e1607843117edff14504ddecbe381f7ad64ea1544bc726779e2d","LICENSE":"853f87c96f3d249f200fec6db1114427bc8bdf4afddc93c576956d78152ce978","README.md":"27c4ba4df8933825ab38b7da3de3b678bee7f1b4a011c6268861da643ac52de2","benches/fixtures/langid.json":"373c11527653c63c685c9e229a8de5ae2b557c25b686a9d891c59e1f603232d8","benches/fixtures/locale.json":"669b19db933094290a45bf856559920f4e92401072e364ac82c482119dc9233a","benches/fixtures/mod.rs":"9a9671eddcf38a6faa10cb814949f8abc15d89f5e70f3ad6f684f1bc3ffe72ea","benches/fixtures/subtags.json":"28be3a639e452d713e807d5779b6819e06277e2dbbf67801ef34964fb9b074b6","benches/helpers/macros.rs":"bba0945a826bc083156bc302507c48c0c99c4d965e2a84352644d768591b0339","benches/helpers/mod.rs":"c98167d866fdb7f66c8cab41e8d57b5aab9e9707dfc66c37ef136e088dac6fef","benches/iai_langid.rs":"8e8f93e4b4e2e70771f86eccfaec8c38f2f8a79f569d72eef29a64bb730f3e0d","benches/langid.rs":"4e3d307d48fd9071308a567a0ef927b229814978abd2ba29f57c65edd51f38e4","benches/locale.rs":"b8d5b1e3f8b5578c549a5149229656fb60de26b76a1bf66b6c1abce75042d674","benches/subtags.rs":"e7e80dabaf31bf031779456614f139cafcdadb805986e71b49133ac964928432","examples/filter_langids.rs":"e000b860432b1646c74709177e4e4df1cfdc9620f41a677d15a5016bd7eb9b29","examples/syntatically_canonicalize_locales.rs":"49184e6e52e2264c61a479c0df88c01e7f7079f3da991445faecca3844594079","src/databake.rs":"894d0f73836d99915c5726d8984e7833498e841e2985cedfd5893aeb2bdcc958","src/extensions/mod.rs":"684cb51f3edc0385f6f7703e81a83c3455bd035d0016bd8e9024b26546037cd1","src/extensions/other/mod.rs":"b126de24198275f847737f8d18715dc7276417f1028b14c84f970275d231c014","src/extensions/other/subtag.rs":"41e9e943d67d5940c1fa01d027e8713c5e95819e4542c4a7f8fbadc9fc47b085","src/extensions/private/mod.rs":"eedc5265a36dde934b69ef08a9f61666f138efbc4c5fd04eb88d20b58f2f6036","src/extensions/private/other.rs":"604341d3888b946102bbc1f9d6d1cc146a1aed26c55158385641f7a80a434b72","src/extensions/transform/fields.rs":"208f7783a49f53e0e120c51b8cdf8df43387e69d0f8cca0621802097b17c9094","src/extensions/transform/key.rs":"05ef426db886862257b4d8e11d0d7762694e858ed8e6e683e40a765be1d7f05b","src/extensions/transform/mod.rs":"31dd61ae69096bef3c8c9948e9a812fdfcc846c30623a645f221fdcde5f89236","src/extensions/transform/value.rs":"31f596b2f70fe19e42992e08dd0ca1130a4b89a41719983609ebf486fe8e0985","src/extensions/unicode/attribute.rs":"021115b6b1880048411dc6a983039dbf4cfce8eabf6895afc008356f13ced960","src/extensions/unicode/attributes.rs":"3b6c10548f78c5a1735d2c6b6c6b5cd9a11c7195843b2f3d71241e2931286412","src/extensions/unicode/key.rs":"3822a2710eeb6d8569666a0f4097cc0a85e5e490d8b7ff0b75a983e686cb26d3","src/extensions/unicode/keywords.rs":"bc33ab96f39d5c0d0b94ed076aec778ebb296a6ac14d141aee0ee3785c442c6d","src/extensions/unicode/mod.rs":"9aaa6e8a3b243d8398bc30d95be7eb003a82d64937979544e52287663196452b","src/extensions/unicode/value.rs":"b25db7ee38e42aa8473bdb7ee7b6ae48339f8f6de2a7f6bddc7d93804df91f39","src/helpers.rs":"8860167ebd2de94a977241efb0a3b60699db537fc64633318fba71c659adcce8","src/langid.rs":"7ced139493bf508aaf2ff8655ff78449194a2745642106b7f80fb9f604ace54a","src/lib.rs":"b0086f71477baa14abe327aece797f3a305ebc0b7cfc0fb7105f1a1dd64108ca","src/locale.rs":"51a28b67ac5df4261fee82501d5bd42e2621b328b84cf85cdddd7c5f1dadc707","src/macros.rs":"f7154fc103ea1120a55bb5898540b20df80de6eec42e70ce15f339d997f2bf52","src/ordering.rs":"d76c6f26ffb5eb1e24646b70ce532985af326c46c488abda52c89074387f1dcc","src/parser/errors.rs":"8af937e67d197272c0f4806cc40cb191c878085b8687f987e358ee01ac2b5004","src/parser/langid.rs":"282678684bf1530a92d5070cd02caef0e5a2797eeebb2a793febe5c74cb15d23","src/parser/locale.rs":"075c74803891894ad50bbedc69366931b8e76c0992b3caa1a5632f0a6816ccfd","src/parser/mod.rs":"5182392624876a419b1469d135d175aba680bb13d14e4f6ea0cfc4e071fbc743","src/serde.rs":"06e940e4f2d15f02d313b4e2b233aea3e74c93c6c43076f5ffe52d49c133608f","src/subtags/language.rs":"9d256e02908b57afdec69a453862af1a1267b04323b9522080e5dafc891a7a63","src/subtags/mod.rs":"a31350b679598b7452849ee6f8f56aefb2f2e370575ffe34dd643b62a0ca3fec","src/subtags/region.rs":"22a6dbe130899ebaab5482ca4f512de931eda1c5194639302995f696082344a2","src/subtags/script.rs":"1d57233bd238af03d4c347adb06b238bc108649da2bd395c03d6c1e879725f8a","src/subtags/variant.rs":"a0a14e1f26f1438b47e9419e696247f197c4a1042070a6e4a41620be720b5ac5","src/subtags/variants.rs":"33c9a8f979078461ae27b1812358a1c984594f4b5e66d2e5ba3ff649f89da7ba","src/zerovec.rs":"a34cfbce609b9ca711d22098a73f3cf17eec6ea73fd00f3106dca698b7dee29e","tests/fixtures/canonicalize.json":"9f2b7cbef72c24944cd4dc50de368c6e3ef69949f29c9ce1aa8807de767a4d0a","tests/fixtures/invalid-extensions.json":"4b7888006360b216030597257de8c301e22877e75216818967bbd8c83b6dbb0b","tests/fixtures/invalid.json":"5247849a6eb805619b8e70254c855227f7bdaf71431b071c91c6cc378ae9766e","tests/fixtures/langid.json":"960fd01722217ef1ea9077e2e0821d7089fe318a241bd7fb7918f50bf8f3f5c3","tests/fixtures/locale.json":"8606e0569fc6ea0e50a1fecb9295b911fbef7d8dbfde3c585476284a751baccf","tests/fixtures/mod.rs":"aea619960540b92199345cbd20ff03d2cb451aa2ce9aa6cf7915223ee9f812a3","tests/helpers/mod.rs":"d3bf59e7eed6230f340bef6c87a7b8de3a387ec391f60afc1b15a0d001cbfb67","tests/langid.rs":"82da0497c4b7d7c5d416ddb96bad0d13d4e51b735b5ed3164a25861de28e2118","tests/locale.rs":"bfbb137e6183e71e6e05076fd3b1caea98a70e69992c8626bb8f316eebc3a23c"},"package":"f284eb342dc49d3e9d9f3b188489d76b5d22dfb1d1a5e0d1941811253bac625c"} \ No newline at end of file
diff --git a/vendor/icu_locid/Cargo.lock b/vendor/icu_locid/Cargo.lock
index 559ba454b..01c56f499 100644
--- a/vendor/icu_locid/Cargo.lock
+++ b/vendor/icu_locid/Cargo.lock
@@ -3,6 +3,15 @@
version = 3
[[package]]
+name = "aho-corasick"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
name = "anes"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -14,7 +23,7 @@ version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
dependencies = [
- "hermit-abi 0.1.19",
+ "hermit-abi",
"libc",
"winapi",
]
@@ -33,9 +42,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bumpalo"
-version = "3.12.0"
+version = "3.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"
+checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
[[package]]
name = "cast"
@@ -51,9 +60,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "ciborium"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f"
+checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926"
dependencies = [
"ciborium-io",
"ciborium-ll",
@@ -62,15 +71,15 @@ dependencies = [
[[package]]
name = "ciborium-io"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369"
+checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656"
[[package]]
name = "ciborium-ll"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b"
+checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b"
dependencies = [
"ciborium-io",
"half",
@@ -78,9 +87,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "3.2.23"
+version = "3.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
+checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"
dependencies = [
"bitflags",
"clap_lex",
@@ -140,16 +149,6 @@ dependencies = [
]
[[package]]
-name = "crossbeam-channel"
-version = "0.5.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200"
-dependencies = [
- "cfg-if",
- "crossbeam-utils",
-]
-
-[[package]]
name = "crossbeam-deque"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -162,9 +161,9 @@ dependencies = [
[[package]]
name = "crossbeam-epoch"
-version = "0.9.14"
+version = "0.9.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695"
+checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
dependencies = [
"autocfg",
"cfg-if",
@@ -175,18 +174,18 @@ dependencies = [
[[package]]
name = "crossbeam-utils"
-version = "0.8.15"
+version = "0.8.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b"
+checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
dependencies = [
"cfg-if",
]
[[package]]
name = "databake"
-version = "0.1.4"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3feab871d671ecc2e912e83e3a64b9b3343a224c86b999334c4c99b07cf07f52"
+checksum = "959b676312ba1aaafb2219c475560082e6b20c3bc572ec1483f93cecd748cf3d"
dependencies = [
"databake-derive",
"proc-macro2",
@@ -196,9 +195,9 @@ dependencies = [
[[package]]
name = "databake-derive"
-version = "0.1.4"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8b3072996668063c5fe00fcef85ee766fc01113f2fdd5e8a31d5ebae260c091"
+checksum = "5f0694dfe255f1af0289d3d1b40787bb955e8603d96e96a6b14b225926e108fb"
dependencies = [
"proc-macro2",
"quote",
@@ -208,9 +207,9 @@ dependencies = [
[[package]]
name = "displaydoc"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886"
+checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [
"proc-macro2",
"quote",
@@ -219,9 +218,9 @@ dependencies = [
[[package]]
name = "either"
-version = "1.8.1"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"
+checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "half"
@@ -245,15 +244,6 @@ dependencies = [
]
[[package]]
-name = "hermit-abi"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
-dependencies = [
- "libc",
-]
-
-[[package]]
name = "iai"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -261,7 +251,7 @@ checksum = "71a816c97c42258aa5834d07590b718b4c9a598944cd39a52dc25b351185d678"
[[package]]
name = "icu_locid"
-version = "1.2.0"
+version = "1.3.2"
dependencies = [
"criterion",
"databake",
@@ -297,15 +287,15 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.6"
+version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
+checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
[[package]]
name = "js-sys"
-version = "0.3.61"
+version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
+checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"
dependencies = [
"wasm-bindgen",
]
@@ -318,58 +308,51 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "libc"
-version = "0.2.141"
+version = "0.2.148"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5"
+checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b"
[[package]]
name = "litemap"
-version = "0.7.0"
+version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a04a5b2b6f54acba899926491d0a6c59d98012938ca2ab5befb281c034e8f94"
+checksum = "77a1a2647d5b7134127971a6de0d533c49de2159167e7f259c427195f87168a1"
[[package]]
name = "log"
-version = "0.4.17"
+version = "0.4.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
-dependencies = [
- "cfg-if",
-]
+checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
[[package]]
-name = "memoffset"
-version = "0.8.0"
+name = "memchr"
+version = "2.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
-dependencies = [
- "autocfg",
-]
+checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c"
[[package]]
-name = "num-traits"
-version = "0.2.15"
+name = "memoffset"
+version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
dependencies = [
"autocfg",
]
[[package]]
-name = "num_cpus"
-version = "1.15.0"
+name = "num-traits"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
+checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
dependencies = [
- "hermit-abi 0.2.6",
- "libc",
+ "autocfg",
]
[[package]]
name = "once_cell"
-version = "1.17.1"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
+checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "oorandom"
@@ -379,15 +362,15 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
[[package]]
name = "os_str_bytes"
-version = "6.5.0"
+version = "6.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267"
+checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac"
[[package]]
name = "plotters"
-version = "0.3.4"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97"
+checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45"
dependencies = [
"num-traits",
"plotters-backend",
@@ -398,24 +381,24 @@ dependencies = [
[[package]]
name = "plotters-backend"
-version = "0.3.4"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142"
+checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609"
[[package]]
name = "plotters-svg"
-version = "0.3.3"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f"
+checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab"
dependencies = [
"plotters-backend",
]
[[package]]
name = "postcard"
-version = "1.0.4"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cfa512cd0d087cc9f99ad30a1bf64795b67871edbead083ffc3a4dfafa59aa00"
+checksum = "d534c6e61df1c7166e636ca612d9820d486fe96ddad37f7abc671517b297488e"
dependencies = [
"cobs",
"serde",
@@ -423,27 +406,27 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.56"
+version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
+checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.26"
+version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
+checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rayon"
-version = "1.7.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b"
+checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1"
dependencies = [
"either",
"rayon-core",
@@ -451,36 +434,48 @@ dependencies = [
[[package]]
name = "rayon-core"
-version = "1.11.0"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d"
+checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed"
dependencies = [
- "crossbeam-channel",
"crossbeam-deque",
"crossbeam-utils",
- "num_cpus",
]
[[package]]
name = "regex"
-version = "1.7.3"
+version = "1.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-automata",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d"
+checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795"
dependencies = [
+ "aho-corasick",
+ "memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
-version = "0.6.29"
+version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
+checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
[[package]]
name = "ryu"
-version = "1.0.13"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
+checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
[[package]]
name = "same-file"
@@ -493,24 +488,24 @@ dependencies = [
[[package]]
name = "scopeguard"
-version = "1.1.0"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
-version = "1.0.156"
+version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4"
+checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.156"
+version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d"
+checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
dependencies = [
"proc-macro2",
"quote",
@@ -519,9 +514,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.96"
+version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
+checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
dependencies = [
"itoa",
"ryu",
@@ -530,9 +525,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "1.0.109"
+version = "2.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8"
dependencies = [
"proc-macro2",
"quote",
@@ -541,9 +536,9 @@ dependencies = [
[[package]]
name = "synstructure"
-version = "0.12.6"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
+checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06"
dependencies = [
"proc-macro2",
"quote",
@@ -559,9 +554,9 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
[[package]]
name = "tinystr"
-version = "0.7.1"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ac3f5b6856e931e15e07b478e98c8045239829a65f9156d4fa7e7788197a5ef"
+checksum = "d5d0e245e80bdc9b4e5356fc45a72184abbc3861992603f515270e9340f5a219"
dependencies = [
"displaydoc",
"serde",
@@ -579,9 +574,9 @@ dependencies = [
[[package]]
name = "unicode-ident"
-version = "1.0.8"
+version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
+checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unicode-xid"
@@ -591,9 +586,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c"
[[package]]
name = "walkdir"
-version = "2.3.3"
+version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698"
+checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
dependencies = [
"same-file",
"winapi-util",
@@ -601,9 +596,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen"
-version = "0.2.84"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
+checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@@ -611,9 +606,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.84"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
+checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"
dependencies = [
"bumpalo",
"log",
@@ -626,9 +621,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.84"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
+checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -636,9 +631,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.84"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
+checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
"proc-macro2",
"quote",
@@ -649,15 +644,15 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.84"
+version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"
+checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"
[[package]]
name = "web-sys"
-version = "0.3.61"
+version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97"
+checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -681,9 +676,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
dependencies = [
"winapi",
]
@@ -696,21 +691,21 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "writeable"
-version = "0.5.2"
+version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60e49e42bdb1d5dc76f4cd78102f8f0714d32edfa3efb82286eb0f0b1fc0da0f"
+checksum = "c0af0c3d13faebf8dda0b5256fa7096a2d5ccb662f7b9f54a40fe201077ab1c2"
[[package]]
name = "zerofrom"
-version = "0.1.2"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df54d76c3251de27615dfcce21e636c172dafb2549cd7fd93e21c66f6ca6bea2"
+checksum = "655b0814c5c0b19ade497851070c640773304939a6c0fd5f5fb43da0696d05b7"
[[package]]
name = "zerovec"
-version = "0.9.4"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "198f54134cd865f437820aa3b43d0ad518af4e68ee161b444cdd15d8e567c8ea"
+checksum = "1194130c5b155bf8ae50ab16c86ab758cd695cf9ad176d2f870b744cbdbb572e"
dependencies = [
"zerofrom",
]
diff --git a/vendor/icu_locid/Cargo.toml b/vendor/icu_locid/Cargo.toml
index 54c842a75..d2086ab28 100644
--- a/vendor/icu_locid/Cargo.toml
+++ b/vendor/icu_locid/Cargo.toml
@@ -11,10 +11,12 @@
[package]
edition = "2021"
+rust-version = "1.66"
name = "icu_locid"
-version = "1.2.0"
+version = "1.3.2"
authors = ["The ICU4X Project Developers"]
include = [
+ "data/**/*",
"src/**/*",
"examples/**/*",
"benches/**/*",
@@ -24,19 +26,19 @@ include = [
"README.md",
]
description = "API for managing Unicode Language and Locale Identifiers"
+homepage = "https://icu4x.unicode.org"
readme = "README.md"
categories = ["internationalization"]
-license = "Unicode-DFS-2016"
+license-file = "LICENSE"
repository = "https://github.com/unicode-org/icu4x"
-[package.metadata.docs.rs]
-all-features = true
-
[package.metadata.cargo-all-features]
denylist = ["bench"]
+[package.metadata.docs.rs]
+all-features = true
+
[lib]
-path = "src/lib.rs"
bench = false
[[example]]
@@ -66,16 +68,19 @@ harness = false
required-features = ["bench"]
[dependencies.databake]
-version = "0.1.3"
+version = "0.1.6"
features = ["derive"]
optional = true
+default-features = false
[dependencies.displaydoc]
version = "0.2.3"
default-features = false
[dependencies.litemap]
-version = "0.7.0"
+version = "0.7.1"
+features = ["alloc"]
+default-features = false
[dependencies.serde]
version = "1.0"
@@ -87,19 +92,18 @@ optional = true
default-features = false
[dependencies.tinystr]
-version = "0.7.1"
+version = "0.7.3"
features = ["alloc"]
default-features = false
[dependencies.writeable]
-version = "0.5.1"
+version = "0.5.3"
+default-features = false
[dependencies.zerovec]
-version = "0.9.4"
+version = "0.10.0"
optional = true
-
-[dev-dependencies.criterion]
-version = "0.4"
+default-features = false
[dev-dependencies.iai]
version = "0.1.1"
@@ -125,3 +129,6 @@ serde = [
]
std = []
zerovec = ["dep:zerovec"]
+
+[target."cfg(not(target_arch = \"wasm32\"))".dev-dependencies.criterion]
+version = "0.4"
diff --git a/vendor/icu_locid/LICENSE b/vendor/icu_locid/LICENSE
index 9858d01ab..9845aa5f4 100644
--- a/vendor/icu_locid/LICENSE
+++ b/vendor/icu_locid/LICENSE
@@ -1,49 +1,42 @@
-UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
-
-See Terms of Use <https://www.unicode.org/copyright.html>
-for definitions of Unicode Inc.’s Data Files and Software.
-
-NOTICE TO USER: Carefully read the following legal agreement.
-BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S
-DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"),
-YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
-TERMS AND CONDITIONS OF THIS AGREEMENT.
-IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE
-THE DATA FILES OR SOFTWARE.
+UNICODE LICENSE V3
COPYRIGHT AND PERMISSION NOTICE
-Copyright © 1991-2022 Unicode, Inc. All rights reserved.
-Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of the Unicode data files and any associated documentation
-(the "Data Files") or Unicode software and any associated documentation
-(the "Software") to deal in the Data Files or Software
-without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, and/or sell copies of
-the Data Files or Software, and to permit persons to whom the Data Files
-or Software are furnished to do so, provided that either
-(a) this copyright and permission notice appear with all copies
-of the Data Files or Software, or
-(b) this copyright and permission notice appear in associated
-Documentation.
-
-THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
-WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT OF THIRD PARTY RIGHTS.
-IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
-NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
-DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THE DATA FILES OR SOFTWARE.
-
-Except as contained in this notice, the name of a copyright holder
-shall not be used in advertising or otherwise to promote the sale,
-use or other dealings in these Data Files or Software without prior
-written authorization of the copyright holder.
+Copyright © 2020-2023 Unicode, Inc.
+
+NOTICE TO USER: Carefully read the following legal agreement. BY
+DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
+SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
+TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
+DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of data files and any associated documentation (the "Data Files") or
+software and any associated documentation (the "Software") to deal in the
+Data Files or Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, and/or sell
+copies of the Data Files or Software, and to permit persons to whom the
+Data Files or Software are furnished to do so, provided that either (a)
+this copyright and permission notice appear with all copies of the Data
+Files or Software, or (b) this copyright and permission notice appear in
+associated Documentation.
+
+THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
+THIRD PARTY RIGHTS.
+
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
+FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in these Data Files or Software without prior written
+authorization of the copyright holder.
—
diff --git a/vendor/icu_locid/README.md b/vendor/icu_locid/README.md
index 5f49c35f5..9469e9b3c 100644
--- a/vendor/icu_locid/README.md
+++ b/vendor/icu_locid/README.md
@@ -1,5 +1,7 @@
# icu_locid [![crates.io](https://img.shields.io/crates/v/icu_locid)](https://crates.io/crates/icu_locid)
+<!-- cargo-rdme start -->
+
Parsing, manipulating, and serializing Unicode Language and Locale Identifiers.
This module is published as its own crate ([`icu_locid`](https://docs.rs/icu_locid/latest/icu_locid/))
@@ -22,7 +24,8 @@ If in doubt, use [`Locale`].
```rust
use icu::locid::Locale;
use icu::locid::{
- locale, subtags_language as language, subtags_region as region,
+ locale,
+ subtags::{language, region},
};
let mut loc: Locale = locale!("en-US");
@@ -43,6 +46,8 @@ For more details, see [`Locale`] and [`LanguageIdentifier`].
[`ICU4X`]: ../icu/index.html
[`Unicode Extensions`]: extensions
+<!-- cargo-rdme end -->
+
## More Information
For more information on development, authorship, contributing etc. please visit [`ICU4X home page`](https://github.com/unicode-org/icu4x).
diff --git a/vendor/icu_locid/benches/iai_langid.rs b/vendor/icu_locid/benches/iai_langid.rs
index bf3b911cf..979da2f0f 100644
--- a/vendor/icu_locid/benches/iai_langid.rs
+++ b/vendor/icu_locid/benches/iai_langid.rs
@@ -2,9 +2,7 @@
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
-use icu_locid::{
- langid, subtags_language as language, subtags_region as region, LanguageIdentifier,
-};
+use icu_locid::{langid, subtags::language, subtags::region, LanguageIdentifier};
use writeable::Writeable;
const LIDS: &[LanguageIdentifier] = &[
diff --git a/vendor/icu_locid/src/extensions/other/mod.rs b/vendor/icu_locid/src/extensions/other/mod.rs
index 44d5c9cf8..933128739 100644
--- a/vendor/icu_locid/src/extensions/other/mod.rs
+++ b/vendor/icu_locid/src/extensions/other/mod.rs
@@ -21,10 +21,12 @@
mod subtag;
+use crate::helpers::ShortSlice;
use crate::parser::ParserError;
use crate::parser::SubtagIterator;
use alloc::vec::Vec;
-pub use subtag::Subtag;
+#[doc(inline)]
+pub use subtag::{subtag, Subtag};
/// A list of [`Other Use Extensions`] as defined in [`Unicode Locale
/// Identifier`] specification.
@@ -49,7 +51,7 @@ pub use subtag::Subtag;
#[derive(Clone, PartialEq, Eq, Debug, Default, Hash, PartialOrd, Ord)]
pub struct Other {
ext: u8,
- keys: Vec<Subtag>,
+ keys: ShortSlice<Subtag>,
}
impl Other {
@@ -71,6 +73,10 @@ impl Other {
/// assert_eq!(&other.to_string(), "a-foo-bar");
/// ```
pub fn from_vec_unchecked(ext: u8, keys: Vec<Subtag>) -> Self {
+ Self::from_short_slice_unchecked(ext, keys.into())
+ }
+
+ pub(crate) fn from_short_slice_unchecked(ext: u8, keys: ShortSlice<Subtag>) -> Self {
assert!(ext.is_ascii_alphabetic());
Self { ext, keys }
}
@@ -78,7 +84,7 @@ impl Other {
pub(crate) fn try_from_iter(ext: u8, iter: &mut SubtagIterator) -> Result<Self, ParserError> {
debug_assert!(ext.is_ascii_alphabetic());
- let mut keys = Vec::new();
+ let mut keys = ShortSlice::new();
while let Some(subtag) = iter.peek() {
if !Subtag::valid_key(subtag) {
break;
@@ -89,7 +95,7 @@ impl Other {
iter.next();
}
- Ok(Self::from_vec_unchecked(ext, keys))
+ Ok(Self::from_short_slice_unchecked(ext, keys))
}
/// Gets the tag character for this extension as a &str.
diff --git a/vendor/icu_locid/src/extensions/other/subtag.rs b/vendor/icu_locid/src/extensions/other/subtag.rs
index ad4d6a0f2..03be56940 100644
--- a/vendor/icu_locid/src/extensions/other/subtag.rs
+++ b/vendor/icu_locid/src/extensions/other/subtag.rs
@@ -11,12 +11,13 @@ impl_tinystr_subtag!(
/// # Examples
///
/// ```
- /// use icu::locid::extensions_other_subtag as subtag;
+ /// use icu::locid::extensions::other::subtag;
///
/// assert_eq!(subtag!("Foo").as_str(), "foo");
/// ```
Subtag,
- extensions::other::Subtag,
+ extensions::other,
+ subtag,
extensions_other_subtag,
2..=8,
s,
diff --git a/vendor/icu_locid/src/extensions/private/mod.rs b/vendor/icu_locid/src/extensions/private/mod.rs
index 8382d166f..161d47f56 100644
--- a/vendor/icu_locid/src/extensions/private/mod.rs
+++ b/vendor/icu_locid/src/extensions/private/mod.rs
@@ -13,7 +13,7 @@
//! # Examples
//!
//! ```
-//! use icu::locid::extensions_private_subtag as subtag;
+//! use icu::locid::extensions::private::subtag;
//! use icu::locid::{locale, Locale};
//!
//! let mut loc: Locale = "en-US-x-foo-faa".parse().expect("Parsing failed.");
@@ -32,8 +32,10 @@ mod other;
use alloc::vec::Vec;
use core::ops::Deref;
-pub use other::Subtag;
+#[doc(inline)]
+pub use other::{subtag, Subtag};
+use crate::helpers::ShortSlice;
use crate::parser::ParserError;
use crate::parser::SubtagIterator;
@@ -58,7 +60,7 @@ use crate::parser::SubtagIterator;
/// [`Private Use Extensions`]: https://unicode.org/reports/tr35/#pu_extensions
/// [`Unicode Locale Identifier`]: https://unicode.org/reports/tr35/#Unicode_locale_identifier
#[derive(Clone, PartialEq, Eq, Debug, Default, Hash, PartialOrd, Ord)]
-pub struct Private(Vec<Subtag>);
+pub struct Private(ShortSlice<Subtag>);
impl Private {
/// Returns a new empty list of private-use extensions. Same as [`default()`](Default::default()), but is `const`.
@@ -72,7 +74,7 @@ impl Private {
/// ```
#[inline]
pub const fn new() -> Self {
- Self(Vec::new())
+ Self(ShortSlice::new())
}
/// A constructor which takes a pre-sorted list of [`Subtag`].
@@ -89,7 +91,7 @@ impl Private {
/// assert_eq!(&private.to_string(), "x-foo-bar");
/// ```
pub fn from_vec_unchecked(input: Vec<Subtag>) -> Self {
- Self(input)
+ Self(input.into())
}
/// Empties the [`Private`] list.
@@ -116,9 +118,9 @@ impl Private {
pub(crate) fn try_from_iter(iter: &mut SubtagIterator) -> Result<Self, ParserError> {
let keys = iter
.map(Subtag::try_from_bytes)
- .collect::<Result<Vec<_>, _>>()?;
+ .collect::<Result<ShortSlice<_>, _>>()?;
- Ok(Self::from_vec_unchecked(keys))
+ Ok(Self(keys))
}
pub(crate) fn for_each_subtag_str<E, F>(&self, f: &mut F) -> Result<(), E>
diff --git a/vendor/icu_locid/src/extensions/private/other.rs b/vendor/icu_locid/src/extensions/private/other.rs
index a91e12855..810ffa2f4 100644
--- a/vendor/icu_locid/src/extensions/private/other.rs
+++ b/vendor/icu_locid/src/extensions/private/other.rs
@@ -18,7 +18,8 @@ impl_tinystr_subtag!(
/// assert_eq!(subtag1.as_str(), "foo");
/// ```
Subtag,
- extensions::private::Subtag,
+ extensions::private,
+ subtag,
extensions_private_subtag,
1..=8,
s,
diff --git a/vendor/icu_locid/src/extensions/transform/fields.rs b/vendor/icu_locid/src/extensions/transform/fields.rs
index f08581a87..2f12de9d1 100644
--- a/vendor/icu_locid/src/extensions/transform/fields.rs
+++ b/vendor/icu_locid/src/extensions/transform/fields.rs
@@ -24,11 +24,10 @@ use super::Value;
/// # Examples
///
/// ```
-/// use icu::locid::extensions::transform::{Fields, Key, Value};
-/// use icu::locid::extensions_transform_key as key;
+/// use icu::locid::extensions::transform::{key, Fields, Key, Value};
///
/// let value = "hybrid".parse::<Value>().expect("Failed to parse a Value.");
-/// let fields = vec![(key!("h0"), value)].into_iter().collect::<Fields>();
+/// let fields = [(key!("h0"), value)].into_iter().collect::<Fields>();
///
/// assert_eq!(&fields.to_string(), "h0-hybrid");
/// ```
@@ -76,11 +75,10 @@ impl Fields {
/// # Examples
///
/// ```
- /// use icu::locid::extensions::transform::{Fields, Value};
- /// use icu::locid::extensions_transform_key as key;
+ /// use icu::locid::extensions::transform::{key, Fields, Value};
///
/// let value = "hybrid".parse::<Value>().expect("Failed to parse a Value.");
- /// let mut fields = vec![(key!("h0"), value)].into_iter().collect::<Fields>();
+ /// let mut fields = [(key!("h0"), value)].into_iter().collect::<Fields>();
///
/// assert_eq!(&fields.to_string(), "h0-hybrid");
///
@@ -102,7 +100,7 @@ impl Fields {
///
/// let key: Key = "h0".parse().expect("Failed to parse a Key.");
/// let value: Value = "hybrid".parse().expect("Failed to parse a Value.");
- /// let mut fields: Fields = vec![(key, value)].into_iter().collect();
+ /// let mut fields = [(key, value)].into_iter().collect::<Fields>();
///
/// let key: Key = "h0".parse().expect("Failed to parse a Key.");
/// assert!(&fields.contains_key(&key));
@@ -121,11 +119,10 @@ impl Fields {
/// # Examples
///
/// ```
- /// use icu::locid::extensions::transform::{Fields, Key, Value};
- /// use icu::locid::extensions_transform_key as key;
+ /// use icu::locid::extensions::transform::{key, Fields, Key, Value};
///
/// let value = "hybrid".parse::<Value>().unwrap();
- /// let fields = vec![(key!("h0"), value.clone())]
+ /// let fields = [(key!("h0"), value.clone())]
/// .into_iter()
/// .collect::<Fields>();
///
@@ -144,9 +141,7 @@ impl Fields {
/// # Examples
///
/// ```
- /// use icu::locid::extensions::transform::Key;
- /// use icu::locid::extensions::transform::Value;
- /// use icu::locid::extensions_transform_key as key;
+ /// use icu::locid::extensions::transform::{key, Key, Value};
/// use icu::locid::Locale;
///
/// let lower = "lower".parse::<Value>().expect("valid extension subtag");
@@ -169,7 +164,7 @@ impl Fields {
/// # Examples
///
/// ```
- /// use icu::locid::extensions_transform_key as key;
+ /// use icu::locid::extensions::transform::key;
/// use icu::locid::Locale;
///
/// let mut loc: Locale = "und-t-h0-hybrid-d0-hex-m0-xml".parse().unwrap();
diff --git a/vendor/icu_locid/src/extensions/transform/key.rs b/vendor/icu_locid/src/extensions/transform/key.rs
index 5400988a1..afdb31d76 100644
--- a/vendor/icu_locid/src/extensions/transform/key.rs
+++ b/vendor/icu_locid/src/extensions/transform/key.rs
@@ -18,7 +18,8 @@ impl_tinystr_subtag!(
/// assert_eq!(key1.as_str(), "k0");
/// ```
Key,
- extensions::transform::Key,
+ extensions::transform,
+ key,
extensions_transform_key,
2..=2,
s,
diff --git a/vendor/icu_locid/src/extensions/transform/mod.rs b/vendor/icu_locid/src/extensions/transform/mod.rs
index 7b97d87f6..4156c5910 100644
--- a/vendor/icu_locid/src/extensions/transform/mod.rs
+++ b/vendor/icu_locid/src/extensions/transform/mod.rs
@@ -35,14 +35,15 @@ mod key;
mod value;
pub use fields::Fields;
-pub use key::Key;
+#[doc(inline)]
+pub use key::{key, Key};
pub use value::Value;
+use crate::helpers::ShortSlice;
use crate::parser::SubtagIterator;
use crate::parser::{parse_language_identifier_from_iter, ParserError, ParserMode};
use crate::subtags::Language;
use crate::LanguageIdentifier;
-use alloc::vec;
use litemap::LiteMap;
/// A list of [`Unicode BCP47 T Extensions`] as defined in [`Unicode Locale
@@ -144,21 +145,24 @@ impl Transform {
}
let mut current_tkey = None;
- let mut current_tvalue = vec![];
+ let mut current_tvalue = ShortSlice::new();
+ let mut has_current_tvalue = false;
while let Some(subtag) = iter.peek() {
if let Some(tkey) = current_tkey {
if let Ok(val) = Value::parse_subtag(subtag) {
- current_tvalue.push(val);
+ has_current_tvalue = true;
+ if let Some(val) = val {
+ current_tvalue.push(val);
+ }
} else {
- if current_tvalue.is_empty() {
+ if !has_current_tvalue {
return Err(ParserError::InvalidExtension);
}
- tfields.try_insert(
- tkey,
- Value::from_vec_unchecked(current_tvalue.drain(..).flatten().collect()),
- );
+ tfields.try_insert(tkey, Value::from_short_slice_unchecked(current_tvalue));
current_tkey = None;
+ current_tvalue = ShortSlice::new();
+ has_current_tvalue = false;
continue;
}
} else if let Ok(tkey) = Key::try_from_bytes(subtag) {
@@ -171,13 +175,10 @@ impl Transform {
}
if let Some(tkey) = current_tkey {
- if current_tvalue.is_empty() {
+ if !has_current_tvalue {
return Err(ParserError::InvalidExtension);
}
- tfields.try_insert(
- tkey,
- Value::from_vec_unchecked(current_tvalue.into_iter().flatten().collect()),
- );
+ tfields.try_insert(tkey, Value::from_short_slice_unchecked(current_tvalue));
}
Ok(Self {
diff --git a/vendor/icu_locid/src/extensions/transform/value.rs b/vendor/icu_locid/src/extensions/transform/value.rs
index f908b0208..798e84793 100644
--- a/vendor/icu_locid/src/extensions/transform/value.rs
+++ b/vendor/icu_locid/src/extensions/transform/value.rs
@@ -2,9 +2,8 @@
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+use crate::helpers::ShortSlice;
use crate::parser::{ParserError, SubtagIterator};
-use alloc::vec;
-use alloc::vec::Vec;
use core::ops::RangeInclusive;
use core::str::FromStr;
use tinystr::TinyAsciiStr;
@@ -28,7 +27,7 @@ use tinystr::TinyAsciiStr;
/// "no".parse::<Value>().expect_err("Invalid Value.");
/// ```
#[derive(Debug, PartialEq, Eq, Clone, Hash, PartialOrd, Ord, Default)]
-pub struct Value(Vec<TinyAsciiStr<{ *TYPE_LENGTH.end() }>>);
+pub struct Value(ShortSlice<TinyAsciiStr<{ *TYPE_LENGTH.end() }>>);
const TYPE_LENGTH: RangeInclusive<usize> = 3..=8;
const TRUE_TVALUE: TinyAsciiStr<8> = tinystr::tinystr!(8, "true");
@@ -45,7 +44,7 @@ impl Value {
/// let value = Value::try_from_bytes(b"hybrid").expect("Parsing failed.");
/// ```
pub fn try_from_bytes(input: &[u8]) -> Result<Self, ParserError> {
- let mut v = vec![];
+ let mut v = ShortSlice::default();
let mut has_value = false;
for subtag in SubtagIterator::new(input) {
@@ -66,12 +65,14 @@ impl Value {
Ok(Self(v))
}
- pub(crate) fn from_vec_unchecked(input: Vec<TinyAsciiStr<{ *TYPE_LENGTH.end() }>>) -> Self {
+ pub(crate) fn from_short_slice_unchecked(
+ input: ShortSlice<TinyAsciiStr<{ *TYPE_LENGTH.end() }>>,
+ ) -> Self {
Self(input)
}
pub(crate) fn is_type_subtag(t: &[u8]) -> bool {
- TYPE_LENGTH.contains(&t.len()) && !t.iter().any(|c: &u8| !c.is_ascii_alphanumeric())
+ TYPE_LENGTH.contains(&t.len()) && t.iter().all(u8::is_ascii_alphanumeric)
}
pub(crate) fn parse_subtag(
@@ -122,9 +123,12 @@ fn test_writeable() {
let foobar = "foobar".parse().unwrap();
assert_writeable_eq!(Value::default(), "true");
- assert_writeable_eq!(Value::from_vec_unchecked(vec![hybrid]), "hybrid");
assert_writeable_eq!(
- Value::from_vec_unchecked(vec![hybrid, foobar]),
+ Value::from_short_slice_unchecked(vec![hybrid].into()),
+ "hybrid"
+ );
+ assert_writeable_eq!(
+ Value::from_short_slice_unchecked(vec![hybrid, foobar].into()),
"hybrid-foobar"
);
}
diff --git a/vendor/icu_locid/src/extensions/unicode/attribute.rs b/vendor/icu_locid/src/extensions/unicode/attribute.rs
index ba4b70924..f6fc53e05 100644
--- a/vendor/icu_locid/src/extensions/unicode/attribute.rs
+++ b/vendor/icu_locid/src/extensions/unicode/attribute.rs
@@ -12,8 +12,7 @@ impl_tinystr_subtag!(
/// # Examples
///
/// ```
- /// use icu::locid::extensions::unicode::Attribute;
- /// use icu::locid::extensions_unicode_attribute as attribute;
+ /// use icu::locid::extensions::unicode::{attribute, Attribute};
///
/// let attr: Attribute =
/// "buddhist".parse().expect("Failed to parse an Attribute.");
@@ -21,7 +20,8 @@ impl_tinystr_subtag!(
/// assert_eq!(attr, attribute!("buddhist"));
/// ```
Attribute,
- extensions::unicode::Attribute,
+ extensions::unicode,
+ attribute,
extensions_unicode_attribute,
3..=8,
s,
diff --git a/vendor/icu_locid/src/extensions/unicode/attributes.rs b/vendor/icu_locid/src/extensions/unicode/attributes.rs
index e58fb04da..1cdaded30 100644
--- a/vendor/icu_locid/src/extensions/unicode/attributes.rs
+++ b/vendor/icu_locid/src/extensions/unicode/attributes.rs
@@ -4,6 +4,7 @@
use super::Attribute;
+use crate::helpers::ShortSlice;
use alloc::vec::Vec;
use core::ops::Deref;
@@ -30,7 +31,7 @@ use core::ops::Deref;
/// assert_eq!(attributes.to_string(), "foobar-testing");
/// ```
#[derive(Default, Debug, PartialEq, Eq, Clone, Hash, PartialOrd, Ord)]
-pub struct Attributes(Vec<Attribute>);
+pub struct Attributes(ShortSlice<Attribute>);
impl Attributes {
/// Returns a new empty set of attributes. Same as [`default()`](Default::default()), but is `const`.
@@ -44,7 +45,7 @@ impl Attributes {
/// ```
#[inline]
pub const fn new() -> Self {
- Self(Vec::new())
+ Self(ShortSlice::new())
}
/// A constructor which takes a pre-sorted list of [`Attribute`] elements.
@@ -68,6 +69,10 @@ impl Attributes {
/// for the caller to use [`binary_search`](slice::binary_search) instead of [`sort`](slice::sort)
/// and [`dedup`](Vec::dedup()).
pub fn from_vec_unchecked(input: Vec<Attribute>) -> Self {
+ Self(input.into())
+ }
+
+ pub(crate) fn from_short_slice_unchecked(input: ShortSlice<Attribute>) -> Self {
Self(input)
}
@@ -78,8 +83,7 @@ impl Attributes {
/// # Examples
///
/// ```
- /// use icu::locid::extensions::unicode::{Attribute, Attributes};
- /// use icu::locid::extensions_unicode_attribute as attribute;
+ /// use icu::locid::extensions::unicode::{attribute, Attribute, Attributes};
/// use writeable::assert_writeable_eq;
///
/// let mut attributes = Attributes::from_vec_unchecked(vec![
diff --git a/vendor/icu_locid/src/extensions/unicode/key.rs b/vendor/icu_locid/src/extensions/unicode/key.rs
index bdfdd4e5c..e008ffd5a 100644
--- a/vendor/icu_locid/src/extensions/unicode/key.rs
+++ b/vendor/icu_locid/src/extensions/unicode/key.rs
@@ -17,7 +17,8 @@ impl_tinystr_subtag!(
/// assert!("ca".parse::<Key>().is_ok());
/// ```
Key,
- extensions::unicode::Key,
+ extensions::unicode,
+ key,
extensions_unicode_key,
2..=2,
s,
diff --git a/vendor/icu_locid/src/extensions/unicode/keywords.rs b/vendor/icu_locid/src/extensions/unicode/keywords.rs
index 4e2fbae9a..c2839fa44 100644
--- a/vendor/icu_locid/src/extensions/unicode/keywords.rs
+++ b/vendor/icu_locid/src/extensions/unicode/keywords.rs
@@ -13,7 +13,7 @@ use crate::helpers::ShortSlice;
use crate::ordering::SubtagOrderingResult;
/// A list of [`Key`]-[`Value`] pairs representing functional information
-/// about locale's internationnalization preferences.
+/// about locale's internationalization preferences.
///
/// Here are examples of fields used in Unicode:
/// - `hc` - Hour Cycle (`h11`, `h12`, `h23`, `h24`)
@@ -30,11 +30,11 @@ use crate::ordering::SubtagOrderingResult;
///
/// ```
/// use icu::locid::{
-/// extensions::unicode::Keywords, extensions_unicode_key as key,
-/// extensions_unicode_value as value, locale,
+/// extensions::unicode::{key, value, Keywords},
+/// locale,
/// };
///
-/// let keywords = vec![(key!("hc"), value!("h23"))]
+/// let keywords = [(key!("hc"), value!("h23"))]
/// .into_iter()
/// .collect::<Keywords>();
///
@@ -45,7 +45,7 @@ use crate::ordering::SubtagOrderingResult;
///
/// ```
/// use icu::locid::{
-/// extensions_unicode_key as key, extensions_unicode_value as value,
+/// extensions::unicode::{key, value},
/// Locale,
/// };
///
@@ -116,12 +116,9 @@ impl Keywords {
/// # Examples
///
/// ```
- /// use icu::locid::{
- /// extensions::unicode::Keywords, extensions_unicode_key as key,
- /// extensions_unicode_value as value,
- /// };
+ /// use icu::locid::extensions::unicode::{key, value, Keywords};
///
- /// let keywords = vec![(key!("ca"), value!("gregory"))]
+ /// let keywords = [(key!("ca"), value!("gregory"))]
/// .into_iter()
/// .collect::<Keywords>();
///
@@ -141,12 +138,9 @@ impl Keywords {
/// # Examples
///
/// ```
- /// use icu::locid::{
- /// extensions::unicode::Keywords, extensions_unicode_key as key,
- /// extensions_unicode_value as value,
- /// };
+ /// use icu::locid::extensions::unicode::{key, value, Keywords};
///
- /// let keywords = vec![(key!("ca"), value!("buddhist"))]
+ /// let keywords = [(key!("ca"), value!("buddhist"))]
/// .into_iter()
/// .collect::<Keywords>();
///
@@ -167,12 +161,9 @@ impl Keywords {
/// # Examples
///
/// ```
- /// use icu::locid::{
- /// extensions::unicode::Keywords, extensions_unicode_key as key,
- /// extensions_unicode_value as value,
- /// };
+ /// use icu::locid::extensions::unicode::{key, value, Keywords};
///
- /// let mut keywords = vec![(key!("ca"), value!("buddhist"))]
+ /// let mut keywords = [(key!("ca"), value!("buddhist"))]
/// .into_iter()
/// .collect::<Keywords>();
///
@@ -196,10 +187,8 @@ impl Keywords {
/// ```
/// use icu::locid::extensions::unicode::Key;
/// use icu::locid::extensions::unicode::Value;
+ /// use icu::locid::extensions::unicode::{key, value};
/// use icu::locid::Locale;
- /// use icu::locid::{
- /// extensions_unicode_key as key, extensions_unicode_value as value,
- /// };
///
/// let mut loc: Locale = "und-u-hello-ca-buddhist-hc-h12"
/// .parse()
@@ -222,8 +211,7 @@ impl Keywords {
/// # Examples
///
/// ```
- /// use icu::locid::extensions::unicode::Key;
- /// use icu::locid::extensions_unicode_key as key;
+ /// use icu::locid::extensions::unicode::{key, Key};
/// use icu::locid::Locale;
///
/// let mut loc: Locale = "und-u-hello-ca-buddhist-hc-h12"
@@ -258,7 +246,7 @@ impl Keywords {
/// # Examples
///
/// ```
- /// use icu::locid::extensions_unicode_key as key;
+ /// use icu::locid::extensions::unicode::key;
/// use icu::locid::Locale;
///
/// let mut loc: Locale = "und-u-ca-buddhist-hc-h12-ms-metric".parse().unwrap();
diff --git a/vendor/icu_locid/src/extensions/unicode/mod.rs b/vendor/icu_locid/src/extensions/unicode/mod.rs
index 687a8c383..95f1a2d78 100644
--- a/vendor/icu_locid/src/extensions/unicode/mod.rs
+++ b/vendor/icu_locid/src/extensions/unicode/mod.rs
@@ -11,12 +11,8 @@
//! # Examples
//!
//! ```
+//! use icu::locid::extensions::unicode::{attribute, key, value, Unicode};
//! use icu::locid::Locale;
-//! use icu::locid::{
-//! extensions::unicode::Unicode,
-//! extensions_unicode_attribute as attribute,
-//! extensions_unicode_key as key, extensions_unicode_value as value,
-//! };
//!
//! let loc: Locale = "en-US-u-foobar-hc-h12".parse().expect("Parsing failed.");
//!
@@ -36,13 +32,16 @@ mod key;
mod keywords;
mod value;
-use alloc::vec;
-pub use attribute::Attribute;
+#[doc(inline)]
+pub use attribute::{attribute, Attribute};
pub use attributes::Attributes;
-pub use key::Key;
+#[doc(inline)]
+pub use key::{key, Key};
pub use keywords::Keywords;
-pub use value::Value;
+#[doc(inline)]
+pub use value::{value, Value};
+use crate::helpers::ShortSlice;
use crate::parser::ParserError;
use crate::parser::SubtagIterator;
use litemap::LiteMap;
@@ -63,10 +62,8 @@ use litemap::LiteMap;
/// # Examples
///
/// ```
+/// use icu::locid::extensions::unicode::{key, value};
/// use icu::locid::Locale;
-/// use icu::locid::{
-/// extensions_unicode_key as key, extensions_unicode_value as value,
-/// };
///
/// let loc: Locale =
/// "de-u-hc-h12-ca-buddhist".parse().expect("Parsing failed.");
@@ -138,11 +135,7 @@ impl Unicode {
}
pub(crate) fn try_from_iter(iter: &mut SubtagIterator) -> Result<Self, ParserError> {
- let mut attributes = vec![];
- let mut keywords = LiteMap::new();
-
- let mut current_keyword = None;
- let mut current_type = vec![];
+ let mut attributes = ShortSlice::new();
while let Some(subtag) = iter.peek() {
if let Ok(attr) = Attribute::try_from_bytes(subtag) {
@@ -155,17 +148,22 @@ impl Unicode {
iter.next();
}
+ let mut keywords = LiteMap::new();
+
+ let mut current_keyword = None;
+ let mut current_value = ShortSlice::new();
+
while let Some(subtag) = iter.peek() {
let slen = subtag.len();
if slen == 2 {
if let Some(kw) = current_keyword.take() {
- keywords.try_insert(kw, Value::from_vec_unchecked(current_type));
- current_type = vec![];
+ keywords.try_insert(kw, Value::from_short_slice_unchecked(current_value));
+ current_value = ShortSlice::new();
}
current_keyword = Some(Key::try_from_bytes(subtag)?);
} else if current_keyword.is_some() {
match Value::parse_subtag(subtag) {
- Ok(Some(t)) => current_type.push(t),
+ Ok(Some(t)) => current_value.push(t),
Ok(None) => {}
Err(_) => break,
}
@@ -176,7 +174,7 @@ impl Unicode {
}
if let Some(kw) = current_keyword.take() {
- keywords.try_insert(kw, Value::from_vec_unchecked(current_type));
+ keywords.try_insert(kw, Value::from_short_slice_unchecked(current_value));
}
// Ensure we've defined at least one attribute or keyword
@@ -186,7 +184,7 @@ impl Unicode {
Ok(Self {
keywords: keywords.into(),
- attributes: Attributes::from_vec_unchecked(attributes),
+ attributes: Attributes::from_short_slice_unchecked(attributes),
})
}
diff --git a/vendor/icu_locid/src/extensions/unicode/value.rs b/vendor/icu_locid/src/extensions/unicode/value.rs
index f1b2402de..d935656a9 100644
--- a/vendor/icu_locid/src/extensions/unicode/value.rs
+++ b/vendor/icu_locid/src/extensions/unicode/value.rs
@@ -4,7 +4,6 @@
use crate::helpers::ShortSlice;
use crate::parser::{ParserError, SubtagIterator};
-use alloc::vec::Vec;
use core::ops::RangeInclusive;
use core::str::FromStr;
use tinystr::TinyAsciiStr;
@@ -20,9 +19,7 @@ use tinystr::TinyAsciiStr;
/// # Examples
///
/// ```
-/// use icu::locid::{
-/// extensions::unicode::Value, extensions_unicode_value as value,
-/// };
+/// use icu::locid::extensions::unicode::{value, Value};
/// use writeable::assert_writeable_eq;
///
/// assert_writeable_eq!(value!("gregory"), "gregory");
@@ -52,7 +49,7 @@ impl Value {
/// Value::try_from_bytes(b"buddhist").expect("Parsing failed.");
/// ```
pub fn try_from_bytes(input: &[u8]) -> Result<Self, ParserError> {
- let mut v = Vec::new();
+ let mut v = ShortSlice::new();
if !input.is_empty() {
for subtag in SubtagIterator::new(input) {
@@ -62,7 +59,7 @@ impl Value {
}
}
}
- Ok(Self(v.into()))
+ Ok(Self(v))
}
/// Const constructor for when the value contains only a single subtag.
@@ -85,7 +82,7 @@ impl Value {
#[doc(hidden)]
pub fn as_tinystr_slice(&self) -> &[TinyAsciiStr<8>] {
- self.0.as_slice()
+ &self.0
}
#[doc(hidden)]
@@ -105,8 +102,8 @@ impl Value {
}
}
- pub(crate) fn from_vec_unchecked(input: Vec<TinyAsciiStr<8>>) -> Self {
- Self(input.into())
+ pub(crate) fn from_short_slice_unchecked(input: ShortSlice<TinyAsciiStr<8>>) -> Self {
+ Self(input)
}
#[doc(hidden)]
@@ -140,7 +137,7 @@ impl Value {
where
F: FnMut(&str) -> Result<(), E>,
{
- self.0.as_slice().iter().map(|t| t.as_str()).try_for_each(f)
+ self.0.iter().map(TinyAsciiStr::as_str).try_for_each(f)
}
}
@@ -161,10 +158,8 @@ impl_writeable_for_subtag_list!(Value, "islamic", "civil");
/// # Examples
///
/// ```
+/// use icu::locid::extensions::unicode::{key, value};
/// use icu::locid::Locale;
-/// use icu::locid::{
-/// extensions_unicode_key as key, extensions_unicode_value as value,
-/// };
///
/// let loc: Locale = "de-u-ca-buddhist".parse().unwrap();
///
@@ -176,6 +171,7 @@ impl_writeable_for_subtag_list!(Value, "islamic", "civil");
///
/// [`Value`]: crate::extensions::unicode::Value
#[macro_export]
+#[doc(hidden)]
macro_rules! extensions_unicode_value {
($value:literal) => {{
// What we want:
@@ -196,3 +192,5 @@ macro_rules! extensions_unicode_value {
R
}};
}
+#[doc(inline)]
+pub use extensions_unicode_value as value;
diff --git a/vendor/icu_locid/src/helpers.rs b/vendor/icu_locid/src/helpers.rs
index 42b2b7286..d12435fbf 100644
--- a/vendor/icu_locid/src/helpers.rs
+++ b/vendor/icu_locid/src/helpers.rs
@@ -7,6 +7,7 @@ use core::iter::FromIterator;
use alloc::boxed::Box;
use alloc::vec;
use alloc::vec::Vec;
+use core::ops::{Deref, DerefMut};
use litemap::store::*;
/// Internal: A vector that supports no-allocation, constant values if length 0 or 1.
@@ -43,24 +44,6 @@ impl<T> ShortSlice<T> {
}
#[inline]
- pub fn as_slice(&self) -> &[T] {
- match self {
- ShortSlice::ZeroOne(None) => &[],
- ShortSlice::ZeroOne(Some(v)) => core::slice::from_ref(v),
- ShortSlice::Multi(v) => v,
- }
- }
-
- #[inline]
- pub fn as_mut_slice(&mut self) -> &mut [T] {
- match self {
- ShortSlice::ZeroOne(None) => &mut [],
- ShortSlice::ZeroOne(Some(v)) => core::slice::from_mut(v),
- ShortSlice::Multi(v) => v,
- }
- }
-
- #[inline]
pub const fn single(&self) -> Option<&T> {
match self {
ShortSlice::ZeroOne(Some(v)) => Some(v),
@@ -134,6 +117,43 @@ impl<T> ShortSlice<T> {
pub fn clear(&mut self) {
let _ = core::mem::replace(self, ShortSlice::ZeroOne(None));
}
+
+ pub fn retain<F>(&mut self, mut f: F)
+ where
+ F: FnMut(&T) -> bool,
+ {
+ *self = match core::mem::take(self) {
+ Self::ZeroOne(Some(one)) if f(&one) => Self::ZeroOne(Some(one)),
+ Self::ZeroOne(_) => Self::ZeroOne(None),
+ Self::Multi(slice) => {
+ let mut vec = slice.into_vec();
+ vec.retain(f);
+ Self::from(vec)
+ }
+ };
+ }
+}
+
+impl<T> Deref for ShortSlice<T> {
+ type Target = [T];
+
+ fn deref(&self) -> &Self::Target {
+ match self {
+ ShortSlice::ZeroOne(None) => &[],
+ ShortSlice::ZeroOne(Some(v)) => core::slice::from_ref(v),
+ ShortSlice::Multi(v) => v,
+ }
+ }
+}
+
+impl<T> DerefMut for ShortSlice<T> {
+ fn deref_mut(&mut self) -> &mut Self::Target {
+ match self {
+ ShortSlice::ZeroOne(None) => &mut [],
+ ShortSlice::ZeroOne(Some(v)) => core::slice::from_mut(v),
+ ShortSlice::Multi(v) => v,
+ }
+ }
}
impl<T> From<Vec<T>> for ShortSlice<T> {
@@ -155,7 +175,18 @@ impl<T> Default for ShortSlice<T> {
impl<T> FromIterator<T> for ShortSlice<T> {
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self {
- iter.into_iter().collect::<Vec<_>>().into()
+ let mut iter = iter.into_iter();
+ match (iter.next(), iter.next()) {
+ (Some(first), Some(second)) => {
+ // Size hint behaviour same as `Vec::extend` + 2
+ let mut vec = Vec::with_capacity(iter.size_hint().0.saturating_add(3));
+ vec.push(first);
+ vec.push(second);
+ vec.extend(iter);
+ Self::Multi(vec.into_boxed_slice())
+ }
+ (first, _) => Self::ZeroOne(first),
+ }
}
}
@@ -176,7 +207,7 @@ impl<K, V> Store<K, V> for ShortSlice<(K, V)> {
#[inline]
fn lm_get(&self, index: usize) -> Option<(&K, &V)> {
- self.as_slice().get(index).map(|elt| (&elt.0, &elt.1))
+ self.get(index).map(|elt| (&elt.0, &elt.1))
}
#[inline]
@@ -193,7 +224,7 @@ impl<K, V> Store<K, V> for ShortSlice<(K, V)> {
where
F: FnMut(&K) -> core::cmp::Ordering,
{
- self.as_slice().binary_search_by(|(k, _)| cmp(k))
+ self.binary_search_by(|(k, _)| cmp(k))
}
}
@@ -212,9 +243,7 @@ impl<K, V> StoreMut<K, V> for ShortSlice<(K, V)> {
fn lm_reserve(&mut self, _additional: usize) {}
fn lm_get_mut(&mut self, index: usize) -> Option<(&K, &mut V)> {
- self.as_mut_slice()
- .get_mut(index)
- .map(|elt| (&elt.0, &mut elt.1))
+ self.get_mut(index).map(|elt| (&elt.0, &mut elt.1))
}
fn lm_push(&mut self, key: K, value: V) {
@@ -232,6 +261,13 @@ impl<K, V> StoreMut<K, V> for ShortSlice<(K, V)> {
fn lm_clear(&mut self) {
self.clear();
}
+
+ fn lm_retain<F>(&mut self, mut predicate: F)
+ where
+ F: FnMut(&K, &V) -> bool,
+ {
+ self.retain(|(k, v)| predicate(k, v))
+ }
}
impl<'a, K: 'a, V: 'a> StoreIterable<'a, K, V> for ShortSlice<(K, V)> {
@@ -239,14 +275,14 @@ impl<'a, K: 'a, V: 'a> StoreIterable<'a, K, V> for ShortSlice<(K, V)> {
core::iter::Map<core::slice::Iter<'a, (K, V)>, for<'r> fn(&'r (K, V)) -> (&'r K, &'r V)>;
fn lm_iter(&'a self) -> Self::KeyValueIter {
- self.as_slice().iter().map(|elt| (&elt.0, &elt.1))
+ self.iter().map(|elt| (&elt.0, &elt.1))
}
}
impl<K, V> StoreFromIterator<K, V> for ShortSlice<(K, V)> {}
#[test]
-fn test_shortvec_impl() {
+fn test_short_slice_impl() {
litemap::testing::check_store::<ShortSlice<(u32, u64)>>();
}
@@ -254,8 +290,9 @@ macro_rules! impl_tinystr_subtag {
(
$(#[$doc:meta])*
$name:ident,
- $($full_name:ident)::+,
+ $($path:ident)::+,
$macro_name:ident,
+ $legacy_macro_name:ident,
$len_start:literal..=$len_end:literal,
$tinystr_ident:ident,
$validate:expr,
@@ -278,7 +315,7 @@ macro_rules! impl_tinystr_subtag {
/// # Examples
///
/// ```
- #[doc = concat!("use icu_locid::", stringify!($($full_name)::+), ";")]
+ #[doc = concat!("use icu_locid::", stringify!($($path::)+), stringify!($name), ";")]
///
#[doc = concat!("assert!(", stringify!($name), "::try_from_bytes(b", stringify!($good_example), ").is_ok());")]
#[doc = concat!("assert!(", stringify!($name), "::try_from_bytes(b", stringify!($bad_example), ").is_err());")]
@@ -349,6 +386,11 @@ macro_rules! impl_tinystr_subtag {
self.0.as_str()
}
+ #[doc(hidden)]
+ pub const fn into_tinystr(&self) -> tinystr::TinyAsciiStr<$len_end> {
+ self.0
+ }
+
/// Compare with BCP-47 bytes.
///
/// The return value is equivalent to what would happen if you first converted
@@ -389,7 +431,7 @@ macro_rules! impl_tinystr_subtag {
impl From<$name> for tinystr::TinyAsciiStr<$len_end> {
fn from(input: $name) -> Self {
- input.0
+ input.into_tinystr()
}
}
@@ -417,37 +459,40 @@ macro_rules! impl_tinystr_subtag {
/// Parsing errors don't have to be handled at runtime:
/// ```
/// assert_eq!(
- #[doc = concat!(" icu_locid::", stringify!($macro_name), "!(", stringify!($good_example) ,"),")]
- #[doc = concat!(" ", stringify!($good_example), ".parse::<icu_locid::", stringify!($($full_name)::+),">().unwrap()")]
+ #[doc = concat!(" icu_locid::", $(stringify!($path), "::",)+ stringify!($macro_name), "!(", stringify!($good_example) ,"),")]
+ #[doc = concat!(" ", stringify!($good_example), ".parse::<icu_locid::", $(stringify!($path), "::",)+ stringify!($name), ">().unwrap()")]
/// );
/// ```
///
/// Invalid input is a compile failure:
/// ```compile_fail,E0080
- #[doc = concat!("icu_locid::", stringify!($macro_name), "!(", stringify!($bad_example) ,");")]
+ #[doc = concat!("icu_locid::", $(stringify!($path), "::",)+ stringify!($macro_name), "!(", stringify!($bad_example) ,");")]
/// ```
///
- #[doc = concat!("[`", stringify!($name), "`]: crate::", stringify!($($full_name)::+))]
+ #[doc = concat!("[`", stringify!($name), "`]: crate::", $(stringify!($path), "::",)+ stringify!($name))]
#[macro_export]
- macro_rules! $macro_name {
+ #[doc(hidden)]
+ macro_rules! $legacy_macro_name {
($string:literal) => {{
- use $crate::$($full_name)::+;
+ use $crate::$($path ::)+ $name;
const R: $name =
match $name::try_from_bytes($string.as_bytes()) {
Ok(r) => r,
#[allow(clippy::panic)] // const context
- _ => panic!(concat!("Invalid ", stringify!($name), ": ", $string)),
+ _ => panic!(concat!("Invalid ", $(stringify!($path), "::",)+ stringify!($name), ": ", $string)),
};
R
}};
}
+ #[doc(inline)]
+ pub use $legacy_macro_name as $macro_name;
#[cfg(feature = "databake")]
impl databake::Bake for $name {
fn bake(&self, env: &databake::CrateEnv) -> databake::TokenStream {
env.insert("icu_locid");
let string = self.as_str();
- databake::quote! {::icu_locid::$macro_name!(#string) }
+ databake::quote! { icu_locid::$($path::)+ $macro_name!(#string) }
}
}
@@ -610,20 +655,20 @@ macro_rules! impl_writeable_for_each_subtag_str_no_test {
macro_rules! impl_writeable_for_subtag_list {
($type:tt, $sample1:literal, $sample2:literal) => {
- impl_writeable_for_each_subtag_str_no_test!($type, selff, selff.0.len() == 1 => alloc::borrow::Cow::Borrowed(selff.0.as_slice().get(0).unwrap().as_str()));
+ impl_writeable_for_each_subtag_str_no_test!($type, selff, selff.0.len() == 1 => alloc::borrow::Cow::Borrowed(selff.0.get(0).unwrap().as_str()));
#[test]
fn test_writeable() {
writeable::assert_writeable_eq!(&$type::default(), "");
writeable::assert_writeable_eq!(
- &$type::from_vec_unchecked(alloc::vec![$sample1.parse().unwrap()]),
+ &$type::from_short_slice_unchecked(alloc::vec![$sample1.parse().unwrap()].into()),
$sample1,
);
writeable::assert_writeable_eq!(
- &$type::from_vec_unchecked(vec![
+ &$type::from_short_slice_unchecked(vec![
$sample1.parse().unwrap(),
$sample2.parse().unwrap()
- ]),
+ ].into()),
core::concat!($sample1, "-", $sample2),
);
}
diff --git a/vendor/icu_locid/src/langid.rs b/vendor/icu_locid/src/langid.rs
index 78668bc0d..512959421 100644
--- a/vendor/icu_locid/src/langid.rs
+++ b/vendor/icu_locid/src/langid.rs
@@ -20,7 +20,8 @@ use writeable::Writeable;
///
/// ```
/// use icu::locid::{
-/// langid, subtags_language as language, subtags_region as region,
+/// langid,
+/// subtags::{language, region},
/// };
///
/// let li = langid!("en-US");
@@ -49,8 +50,8 @@ use writeable::Writeable;
///
/// ```
/// use icu::locid::{
-/// langid, subtags_language as language, subtags_region as region,
-/// subtags_script as script, subtags_variant as variant,
+/// langid,
+/// subtags::{language, region, script, variant},
/// };
///
/// let li = langid!("eN_latn_Us-Valencia");
@@ -257,7 +258,7 @@ impl LanguageIdentifier {
/// Compare this `LanguageIdentifier` with a potentially unnormalized BCP-47 string.
///
/// The return value is equivalent to what would happen if you first parsed the
- /// BCP-47 string to a `LanguageIdentifier` and then performed a structucal comparison.
+ /// BCP-47 string to a `LanguageIdentifier` and then performed a structural comparison.
///
/// # Examples
///
@@ -382,9 +383,7 @@ fn test_writeable() {
/// # Examples
///
/// ```
-/// use icu::locid::{
-/// langid, subtags_language as language, LanguageIdentifier,
-/// };
+/// use icu::locid::{langid, subtags::language, LanguageIdentifier};
///
/// assert_eq!(LanguageIdentifier::from(language!("en")), langid!("en"));
/// ```
@@ -400,7 +399,7 @@ impl From<subtags::Language> for LanguageIdentifier {
/// # Examples
///
/// ```
-/// use icu::locid::{langid, subtags_script as script, LanguageIdentifier};
+/// use icu::locid::{langid, subtags::script, LanguageIdentifier};
///
/// assert_eq!(
/// LanguageIdentifier::from(Some(script!("latn"))),
@@ -419,7 +418,7 @@ impl From<Option<subtags::Script>> for LanguageIdentifier {
/// # Examples
///
/// ```
-/// use icu::locid::{langid, subtags_region as region, LanguageIdentifier};
+/// use icu::locid::{langid, subtags::region, LanguageIdentifier};
///
/// assert_eq!(
/// LanguageIdentifier::from(Some(region!("US"))),
@@ -441,8 +440,9 @@ impl From<Option<subtags::Region>> for LanguageIdentifier {
///
/// ```
/// use icu::locid::{
-/// langid, subtags_language as language, subtags_region as region,
-/// subtags_script as script, LanguageIdentifier,
+/// langid,
+/// subtags::{language, region, script},
+/// LanguageIdentifier,
/// };
///
/// let lang = language!("en");
@@ -482,8 +482,8 @@ impl
///
/// ```
/// use icu::locid::{
-/// langid, subtags_language as language, subtags_region as region,
-/// subtags_script as script,
+/// langid,
+/// subtags::{language, region, script},
/// };
///
/// let lid = langid!("en-Latn-US");
diff --git a/vendor/icu_locid/src/lib.rs b/vendor/icu_locid/src/lib.rs
index d9c4f7699..9c6c46ca5 100644
--- a/vendor/icu_locid/src/lib.rs
+++ b/vendor/icu_locid/src/lib.rs
@@ -24,7 +24,8 @@
//! ```
//! use icu::locid::Locale;
//! use icu::locid::{
-//! locale, subtags_language as language, subtags_region as region,
+//! locale,
+//! subtags::{language, region},
//! };
//!
//! let mut loc: Locale = locale!("en-US");
@@ -81,6 +82,7 @@ pub use parser::errors::ParserError;
pub use ParserError as Error;
pub mod extensions;
+#[macro_use]
pub mod subtags;
pub mod zerovec;
diff --git a/vendor/icu_locid/src/locale.rs b/vendor/icu_locid/src/locale.rs
index 4412da86e..e87cdf1a2 100644
--- a/vendor/icu_locid/src/locale.rs
+++ b/vendor/icu_locid/src/locale.rs
@@ -28,8 +28,9 @@ use writeable::Writeable;
///
/// ```
/// use icu_locid::{
-/// extensions_unicode_key as key, extensions_unicode_value as value,
-/// locale, subtags_language as language, subtags_region as region,
+/// extensions::unicode::{key, value},
+/// locale,
+/// subtags::{language, region},
/// };
///
/// let loc = locale!("en-US-u-ca-buddhist");
@@ -56,7 +57,8 @@ use writeable::Writeable;
/// `_` separators to `-` and adjusting casing to conform to the Unicode standard.
///
/// Any bogus subtags will cause the parsing to fail with an error.
-/// No subtag validation or canonicalization is performed.
+///
+/// No subtag validation or alias resolution is performed.
///
/// # Examples
///
@@ -98,13 +100,13 @@ fn test_sizes() {
assert_eq!(core::mem::size_of::<Option<LanguageIdentifier>>(), 32);
assert_eq!(core::mem::size_of::<extensions::transform::Fields>(), 24);
- assert_eq!(core::mem::size_of::<extensions::unicode::Attributes>(), 24);
+ assert_eq!(core::mem::size_of::<extensions::unicode::Attributes>(), 16);
assert_eq!(core::mem::size_of::<extensions::unicode::Keywords>(), 24);
assert_eq!(core::mem::size_of::<Vec<extensions::other::Other>>(), 24);
- assert_eq!(core::mem::size_of::<extensions::private::Private>(), 24);
- assert_eq!(core::mem::size_of::<extensions::Extensions>(), 152);
+ assert_eq!(core::mem::size_of::<extensions::private::Private>(), 16);
+ assert_eq!(core::mem::size_of::<extensions::Extensions>(), 136);
- assert_eq!(core::mem::size_of::<Locale>(), 184);
+ assert_eq!(core::mem::size_of::<Locale>(), 168);
}
impl Locale {
@@ -250,7 +252,7 @@ impl Locale {
/// Compare this `Locale` with a potentially unnormalized BCP-47 string.
///
/// The return value is equivalent to what would happen if you first parsed the
- /// BCP-47 string to a `Locale` and then performed a structucal comparison.
+ /// BCP-47 string to a `Locale` and then performed a structural comparison.
///
/// # Examples
///
@@ -422,7 +424,7 @@ fn test_writeable() {
///
/// ```
/// use icu::locid::Locale;
-/// use icu::locid::{locale, subtags_language as language};
+/// use icu::locid::{locale, subtags::language};
///
/// assert_eq!(Locale::from(language!("en")), locale!("en"));
/// ```
@@ -439,7 +441,7 @@ impl From<subtags::Language> for Locale {
///
/// ```
/// use icu::locid::Locale;
-/// use icu::locid::{locale, subtags_script as script};
+/// use icu::locid::{locale, subtags::script};
///
/// assert_eq!(Locale::from(Some(script!("latn"))), locale!("und-Latn"));
/// ```
@@ -456,7 +458,7 @@ impl From<Option<subtags::Script>> for Locale {
///
/// ```
/// use icu::locid::Locale;
-/// use icu::locid::{locale, subtags_region as region};
+/// use icu::locid::{locale, subtags::region};
///
/// assert_eq!(Locale::from(Some(region!("US"))), locale!("und-US"));
/// ```
@@ -474,8 +476,8 @@ impl From<Option<subtags::Region>> for Locale {
/// ```
/// use icu::locid::Locale;
/// use icu::locid::{
-/// locale, subtags_language as language, subtags_region as region,
-/// subtags_script as script,
+/// locale,
+/// subtags::{language, region, script},
/// };
///
/// assert_eq!(
diff --git a/vendor/icu_locid/src/parser/langid.rs b/vendor/icu_locid/src/parser/langid.rs
index 653ca7e6e..2c6ddeb03 100644
--- a/vendor/icu_locid/src/parser/langid.rs
+++ b/vendor/icu_locid/src/parser/langid.rs
@@ -5,10 +5,10 @@
pub use super::errors::ParserError;
use crate::extensions::unicode::{Attribute, Key, Value};
use crate::extensions::ExtensionType;
+use crate::helpers::ShortSlice;
use crate::parser::SubtagIterator;
use crate::LanguageIdentifier;
use crate::{extensions, subtags};
-use alloc::vec::Vec;
use tinystr::TinyAsciiStr;
#[derive(PartialEq, Clone, Copy)]
@@ -31,7 +31,7 @@ pub fn parse_language_identifier_from_iter(
) -> Result<LanguageIdentifier, ParserError> {
let mut script = None;
let mut region = None;
- let mut variants = Vec::new();
+ let mut variants = ShortSlice::new();
let language = if let Some(subtag) = iter.next() {
subtags::Language::try_from_bytes(subtag)?
@@ -95,7 +95,7 @@ pub fn parse_language_identifier_from_iter(
language,
script,
region,
- variants: subtags::Variants::from_vec_unchecked(variants),
+ variants: subtags::Variants::from_short_slice_unchecked(variants),
})
}
diff --git a/vendor/icu_locid/src/subtags/language.rs b/vendor/icu_locid/src/subtags/language.rs
index 86b51b93a..6fd08a2d5 100644
--- a/vendor/icu_locid/src/subtags/language.rs
+++ b/vendor/icu_locid/src/subtags/language.rs
@@ -5,7 +5,7 @@
impl_tinystr_subtag!(
/// A language subtag (examples: `"en"`, `"csb"`, `"zh"`, `"und"`, etc.)
///
- /// [`Language`] represents a Unicode base language code conformat to the
+ /// [`Language`] represents a Unicode base language code conformant to the
/// [`unicode_language_id`] field of the Language and Locale Identifier.
///
/// # Examples
@@ -34,7 +34,8 @@ impl_tinystr_subtag!(
///
/// [`unicode_language_id`]: https://unicode.org/reports/tr35/#unicode_language_id
Language,
- subtags::Language,
+ subtags,
+ language,
subtags_language,
2..=3,
s,
@@ -63,7 +64,7 @@ impl Language {
/// # Examples
///
/// ```
- /// use icu::locid::{subtags::Language, subtags_language as language};
+ /// use icu::locid::subtags::{language, Language};
///
/// let mut lang = language!("csb");
///
diff --git a/vendor/icu_locid/src/subtags/mod.rs b/vendor/icu_locid/src/subtags/mod.rs
index bd243a321..9cc04dac8 100644
--- a/vendor/icu_locid/src/subtags/mod.rs
+++ b/vendor/icu_locid/src/subtags/mod.rs
@@ -51,8 +51,12 @@ mod script;
mod variant;
mod variants;
-pub use language::Language;
-pub use region::Region;
-pub use script::Script;
-pub use variant::Variant;
+#[doc(inline)]
+pub use language::{language, Language};
+#[doc(inline)]
+pub use region::{region, Region};
+#[doc(inline)]
+pub use script::{script, Script};
+#[doc(inline)]
+pub use variant::{variant, Variant};
pub use variants::Variants;
diff --git a/vendor/icu_locid/src/subtags/region.rs b/vendor/icu_locid/src/subtags/region.rs
index f605937ce..4348f15e7 100644
--- a/vendor/icu_locid/src/subtags/region.rs
+++ b/vendor/icu_locid/src/subtags/region.rs
@@ -5,7 +5,7 @@
impl_tinystr_subtag!(
/// A region subtag (examples: `"US"`, `"CN"`, `"AR"` etc.)
///
- /// [`Region`] represents a Unicode base language code conformat to the
+ /// [`Region`] represents a Unicode base language code conformant to the
/// [`unicode_region_id`] field of the Language and Locale Identifier.
///
/// # Examples
@@ -19,7 +19,8 @@ impl_tinystr_subtag!(
///
/// [`unicode_region_id`]: https://unicode.org/reports/tr35/#unicode_region_id
Region,
- subtags::Region,
+ subtags,
+ region,
subtags_region,
2..=3,
s,
diff --git a/vendor/icu_locid/src/subtags/script.rs b/vendor/icu_locid/src/subtags/script.rs
index 05eb63d1c..79ead0390 100644
--- a/vendor/icu_locid/src/subtags/script.rs
+++ b/vendor/icu_locid/src/subtags/script.rs
@@ -5,7 +5,7 @@
impl_tinystr_subtag!(
/// A script subtag (examples: `"Latn"`, `"Arab"`, etc.)
///
- /// [`Script`] represents a Unicode base language code conformat to the
+ /// [`Script`] represents a Unicode base language code conformant to the
/// [`unicode_script_id`] field of the Language and Locale Identifier.
///
/// # Examples
@@ -19,7 +19,8 @@ impl_tinystr_subtag!(
///
/// [`unicode_script_id`]: https://unicode.org/reports/tr35/#unicode_script_id
Script,
- subtags::Script,
+ subtags,
+ script,
subtags_script,
4..=4,
s,
diff --git a/vendor/icu_locid/src/subtags/variant.rs b/vendor/icu_locid/src/subtags/variant.rs
index 96fd7500e..c60b13865 100644
--- a/vendor/icu_locid/src/subtags/variant.rs
+++ b/vendor/icu_locid/src/subtags/variant.rs
@@ -5,7 +5,7 @@
impl_tinystr_subtag!(
/// A variant subtag (examples: `"macos"`, `"posix"`, `"1996"` etc.)
///
- /// [`Variant`] represents a Unicode base language code conformat to the
+ /// [`Variant`] represents a Unicode base language code conformant to the
/// [`unicode_variant_id`] field of the Language and Locale Identifier.
///
/// # Examples
@@ -19,7 +19,8 @@ impl_tinystr_subtag!(
///
/// [`unicode_variant_id`]: https://unicode.org/reports/tr35/#unicode_variant_id
Variant,
- subtags::Variant,
+ subtags,
+ variant,
subtags_variant,
4..=8,
s,
diff --git a/vendor/icu_locid/src/subtags/variants.rs b/vendor/icu_locid/src/subtags/variants.rs
index 70aeae1d9..ba5ff1bc1 100644
--- a/vendor/icu_locid/src/subtags/variants.rs
+++ b/vendor/icu_locid/src/subtags/variants.rs
@@ -16,7 +16,7 @@ use core::ops::Deref;
/// # Examples
///
/// ```
-/// use icu::locid::{subtags::Variants, subtags_variant as variant};
+/// use icu::locid::subtags::{variant, Variants};
///
/// let mut v = vec![variant!("posix"), variant!("macos")];
/// v.sort();
@@ -48,7 +48,7 @@ impl Variants {
/// # Examples
///
/// ```
- /// use icu::locid::{subtags::Variants, subtags_variant as variant};
+ /// use icu::locid::subtags::{variant, Variants};
///
/// let variants = Variants::from_variant(variant!("posix"));
/// ```
@@ -64,7 +64,7 @@ impl Variants {
/// # Examples
///
/// ```
- /// use icu::locid::{subtags::Variants, subtags_variant as variant};
+ /// use icu::locid::subtags::{variant, Variants};
///
/// let mut v = vec![variant!("posix"), variant!("macos")];
/// v.sort();
@@ -77,7 +77,11 @@ impl Variants {
/// for the caller to use [`binary_search`](slice::binary_search) instead of [`sort`](slice::sort)
/// and [`dedup`](Vec::dedup()).
pub fn from_vec_unchecked(input: Vec<Variant>) -> Self {
- Self(ShortSlice::from(input))
+ Self(input.into())
+ }
+
+ pub(crate) fn from_short_slice_unchecked(input: ShortSlice<Variant>) -> Self {
+ Self(input)
}
/// Empties the [`Variants`] list.
@@ -87,7 +91,7 @@ impl Variants {
/// # Examples
///
/// ```
- /// use icu::locid::{subtags::Variants, subtags_variant as variant};
+ /// use icu::locid::subtags::{variant, Variants};
///
/// let mut v = vec![variant!("posix"), variant!("macos")];
/// v.sort();
@@ -119,6 +123,6 @@ impl Deref for Variants {
type Target = [Variant];
fn deref(&self) -> &[Variant] {
- self.0.as_slice()
+ self.0.deref()
}
}
diff --git a/vendor/icu_locid/src/zerovec.rs b/vendor/icu_locid/src/zerovec.rs
index 530d21499..ba6a3e85d 100644
--- a/vendor/icu_locid/src/zerovec.rs
+++ b/vendor/icu_locid/src/zerovec.rs
@@ -60,8 +60,8 @@
//! use icu_locid::subtags::{Language, Region, Script};
//! use icu_locid::LanguageIdentifier;
//! use icu_locid::{
-//! langid, subtags_language as language, subtags_region as region,
-//! subtags_script as script,
+//! langid,
+//! subtags::{language, region, script},
//! };
//! use zerovec::ZeroMap;
//!