зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 847d3af58756 (bug 1869512) per dev's request
This commit is contained in:
Родитель
92a10c2108
Коммит
217168827c
|
@ -5761,9 +5761,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "unic-langid"
|
||||
version = "0.9.3"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "887622f8e7b723780c5e64b04dcc0c9b8f426ada7cca6790cd3ea3bf0f08037a"
|
||||
checksum = "398f9ad7239db44fd0f80fe068d12ff22d78354080332a5077dc6f52f14dcf2f"
|
||||
dependencies = [
|
||||
"unic-langid-impl",
|
||||
]
|
||||
|
@ -5779,9 +5779,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "unic-langid-impl"
|
||||
version = "0.9.3"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5adeb847e35eed4efbffd9fb2e4d078b91ece56e4d6a3c0d2df55b3a1dac07d5"
|
||||
checksum = "e35bfd2f2b8796545b55d7d3fd3e89a0613f68a0d1c8bc28cb7ff96b411a35ff"
|
||||
dependencies = [
|
||||
"tinystr",
|
||||
]
|
||||
|
|
|
@ -3870,11 +3870,6 @@ who = "Mike Hommey <mh+mozilla@glandium.org>"
|
|||
criteria = "safe-to-deploy"
|
||||
delta = "0.9.0 -> 0.9.1"
|
||||
|
||||
[[audits.unic-langid]]
|
||||
who = "Eemeli Aro <eemeli@mozilla.com>"
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.9.1 -> 0.9.3"
|
||||
|
||||
[[audits.unic-langid-impl]]
|
||||
who = "Zibi Braniecki <zibi@unicode.org>"
|
||||
criteria = "safe-to-deploy"
|
||||
|
@ -3885,12 +3880,6 @@ who = "Makoto Kato <m_kato@ga2.so-net.ne.jp>"
|
|||
criteria = "safe-to-deploy"
|
||||
delta = "0.9.0 -> 0.9.1"
|
||||
|
||||
[[audits.unic-langid-impl]]
|
||||
who = "Eemeli Aro <eemeli@mozilla.com>"
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.9.1 -> 0.9.3"
|
||||
notes = "I have authored the upstream changes included here."
|
||||
|
||||
[[audits.unic-langid-macros]]
|
||||
who = "Zibi Braniecki <zibi@unicode.org>"
|
||||
criteria = "safe-to-deploy"
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"files":{"Cargo.lock":"3f937f91a23ee53594dcee9dfd1e44849e38ab802b9892f4d4af583f660e725d","Cargo.toml":"fccb89c976bc686e1c1486ae099f5c29fc0668abaecc0631f28e7660f9b3e717","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"1ce686b1ba46e7fff771db934d1e8905e3d96c73d9e6712ca85011cf63cf4157","benches/canonicalize.rs":"1bc9db6454ed711c1c1d58a9236d1ed02c40645782338697812dc21b26c2295f","benches/langid.rs":"46dc68e1ee1c998fe957035c11c373cc5d2c2993dd3058aeb36014028618a46e","benches/likely_subtags.rs":"33debb6db4eabd0166525c7c06868f86e35958c2d0d9e5e7668f28b1aff3da23","benches/parser.rs":"bc5460589125aca2ca4c4cf475fde81e7de6aa70c7bf8443996b6246b44110a3","data/cldr-misc-full/README.md":"3a9754c33ea24a832bf58b4fb0c2b19fb18cda7a3159fa2107960224a7b0e335","src/bin/generate_layout.rs":"ac7696e7ee2280c1f59542836c2a5bdc7eb2701d78af3e989e9aacbcf365aa54","src/bin/generate_likelysubtags.rs":"9b0df3a008d0f6090ee441e4c649f00f9b78c7d23434f389fe3de2288951cf72","src/errors.rs":"091525fd3d704cc4698bab82af9fff1f2e6fc793910700790ec3ef943b3eddfe","src/layout_table.rs":"a3842941e96f273673cacca6cd81aa270e992aed97fbd96877d05376bd30506c","src/lib.rs":"b666afdfd143fe206f7da5b0ab13c5bce173b755747e45e1963d6cb1a7da9c20","src/likelysubtags/mod.rs":"66889568b883675465faa445e257b4b70e9dcba98c6c523eb34a08ebb50377c0","src/likelysubtags/tables.rs":"64f8b9788dd792dd9e58c9fd582f662359c7afcda61d105f39069a94bc12bb47","src/parser/errors.rs":"2dacf5bf388499c9fbecf64ef950038f123335e87b6691bcdb88d185678f38d5","src/parser/mod.rs":"30f9ff487ab7b023ec7e6cfbfe4f4ebc41ca524cef0eba96a6b77ad624c9f6b8","src/serde.rs":"2ce1fdea1217c4f72b2c8e00f333902ff496c54eef5b4534adb289375c50aef0","src/subtags/language.rs":"5cc07ee0b83ac2b4ce2462ac98391e34ef269a07aa11167bc432c9b882b5a0cc","src/subtags/mod.rs":"ba23712d7ce5e0fa896c97ddc91d7eacbf21a99d62c15f5cf19a6653876bf56b","src/subtags/region.rs":"f3455679067ed0da9103d5433586cb4809628847e923bbcf35cc2d2b25a0d35e","src/subtags/script.rs":"c5ca9a2ab6d8b3a1dc3f52a73665223f0dd30901b8e5d722dd93e58a69710f5d","src/subtags/variant.rs":"418c8d1307f5ca0c7463397b5b944a0d1c712c41b1640e56ce78c3ace4b9b339","tests/canonicalize_test.rs":"5ca005223ae159c15f8809c28c1cc950dc4d69063d9de70b885f18ef8e6cca28","tests/fixtures.rs":"d03a280b67080dac1bc333255e89d8903164688a6dfaed5adbea68efd65ef1bc","tests/language_identifier_test.rs":"e7d7d241713206549b3d7b249dcd7869b11a06db0d59171cdb1bb8f0be7012ef","tests/likelysubtags.rs":"c154da2ba3bc31d2f2b37fe544c8e74123fd5470dffa718bbf9f4c350cca451d"},"package":"5adeb847e35eed4efbffd9fb2e4d078b91ece56e4d6a3c0d2df55b3a1dac07d5"}
|
||||
{"files":{"Cargo.lock":"da3d5fabc92472ac1f45fa321f1e188fd3fff22b3234d3f74e78a8f79503aac9","Cargo.toml":"67560e144c925cdb1467085067b51138da8461c4babd170777e90082a1664d61","README.md":"1ce686b1ba46e7fff771db934d1e8905e3d96c73d9e6712ca85011cf63cf4157","benches/canonicalize.rs":"1bc9db6454ed711c1c1d58a9236d1ed02c40645782338697812dc21b26c2295f","benches/langid.rs":"46dc68e1ee1c998fe957035c11c373cc5d2c2993dd3058aeb36014028618a46e","benches/likely_subtags.rs":"33debb6db4eabd0166525c7c06868f86e35958c2d0d9e5e7668f28b1aff3da23","benches/parser.rs":"bc5460589125aca2ca4c4cf475fde81e7de6aa70c7bf8443996b6246b44110a3","data/cldr-misc-full/README.md":"b4bbc8e56b8c9f5d482d2dd211e53720cdca27b0e98eec274e56577d41906b92","src/bin/generate_layout.rs":"e1df742c318ba4de09a25edad082a398da1d5591ac24074f9eadf3f40d677a9a","src/bin/generate_likelysubtags.rs":"9b0df3a008d0f6090ee441e4c649f00f9b78c7d23434f389fe3de2288951cf72","src/errors.rs":"091525fd3d704cc4698bab82af9fff1f2e6fc793910700790ec3ef943b3eddfe","src/layout_table.rs":"c311b5399a22efd69f14decb00aee7dfb2943a090832e2aef127e2853ad1ce0b","src/lib.rs":"75b5e8958ba0139ef60139e61441d29c80bde8552d1adead3905165c11ed97cd","src/likelysubtags/mod.rs":"66889568b883675465faa445e257b4b70e9dcba98c6c523eb34a08ebb50377c0","src/likelysubtags/tables.rs":"47ab40497145adc553f9f585d1ec79d01028495a57b1907392642afd26986e89","src/parser/errors.rs":"2dacf5bf388499c9fbecf64ef950038f123335e87b6691bcdb88d185678f38d5","src/parser/mod.rs":"30f9ff487ab7b023ec7e6cfbfe4f4ebc41ca524cef0eba96a6b77ad624c9f6b8","src/serde.rs":"2ce1fdea1217c4f72b2c8e00f333902ff496c54eef5b4534adb289375c50aef0","src/subtags/language.rs":"ea198788c10a9b24a88d2316d516a1b6325b20c57c1d05586edc7c50acc1e27d","src/subtags/mod.rs":"ba23712d7ce5e0fa896c97ddc91d7eacbf21a99d62c15f5cf19a6653876bf56b","src/subtags/region.rs":"f3455679067ed0da9103d5433586cb4809628847e923bbcf35cc2d2b25a0d35e","src/subtags/script.rs":"c5ca9a2ab6d8b3a1dc3f52a73665223f0dd30901b8e5d722dd93e58a69710f5d","src/subtags/variant.rs":"a0feec8b44933ff04a3d3f91e9e69f7537468e7c813c3780eb87e51512f6d1dd","tests/canonicalize_test.rs":"5ca005223ae159c15f8809c28c1cc950dc4d69063d9de70b885f18ef8e6cca28","tests/fixtures.rs":"d03a280b67080dac1bc333255e89d8903164688a6dfaed5adbea68efd65ef1bc","tests/language_identifier_test.rs":"90a4d7ac4961c1e214de166036c1b5cae21f3a99f157fe00d149d8b9106cb7b9","tests/likelysubtags.rs":"f5db0c3ec9f545eef148914486c7a74f1bbc629f4dcff3077242c174c0c1c6a3"},"package":"e35bfd2f2b8796545b55d7d3fd3e89a0613f68a0d1c8bc28cb7ff96b411a35ff"}
|
|
@ -2,15 +2,6 @@
|
|||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
|
@ -35,10 +26,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.14.0"
|
||||
name = "bstr"
|
||||
version = "0.2.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
|
||||
checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba"
|
||||
|
||||
[[package]]
|
||||
name = "cast"
|
||||
|
@ -100,10 +103,20 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
version = "0.8.3"
|
||||
name = "crossbeam-channel"
|
||||
version = "0.5.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
|
||||
checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-deque"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"crossbeam-epoch",
|
||||
|
@ -112,9 +125,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "crossbeam-epoch"
|
||||
version = "0.9.15"
|
||||
version = "0.9.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7"
|
||||
checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"cfg-if",
|
||||
|
@ -125,39 +138,40 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.16"
|
||||
version = "0.8.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294"
|
||||
checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "csv"
|
||||
version = "1.3.0"
|
||||
version = "1.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe"
|
||||
checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1"
|
||||
dependencies = [
|
||||
"bstr",
|
||||
"csv-core",
|
||||
"itoa",
|
||||
"itoa 0.4.8",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "csv-core"
|
||||
version = "0.1.11"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70"
|
||||
checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "displaydoc"
|
||||
version = "0.2.4"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
|
||||
checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -166,9 +180,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.9.0"
|
||||
version = "1.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
|
||||
checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
|
||||
|
||||
[[package]]
|
||||
name = "half"
|
||||
|
@ -196,15 +210,21 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.9"
|
||||
version = "0.4.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
|
||||
checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.66"
|
||||
version = "0.3.60"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca"
|
||||
checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"
|
||||
dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
@ -217,45 +237,58 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.150"
|
||||
version = "0.2.135"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
|
||||
checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.20"
|
||||
version = "0.4.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
|
||||
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.6.4"
|
||||
version = "2.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
|
||||
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
||||
|
||||
[[package]]
|
||||
name = "memoffset"
|
||||
version = "0.9.0"
|
||||
version = "0.6.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
|
||||
checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.17"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c"
|
||||
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.18.0"
|
||||
name = "num_cpus"
|
||||
version = "1.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
|
||||
checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1"
|
||||
|
||||
[[package]]
|
||||
name = "oorandom"
|
||||
|
@ -265,9 +298,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
|
|||
|
||||
[[package]]
|
||||
name = "plotters"
|
||||
version = "0.3.5"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45"
|
||||
checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
"plotters-backend",
|
||||
|
@ -278,91 +311,87 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "plotters-backend"
|
||||
version = "0.3.5"
|
||||
version = "0.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609"
|
||||
checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142"
|
||||
|
||||
[[package]]
|
||||
name = "plotters-svg"
|
||||
version = "0.3.5"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab"
|
||||
checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f"
|
||||
dependencies = [
|
||||
"plotters-backend",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.70"
|
||||
version = "1.0.47"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b"
|
||||
checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.33"
|
||||
version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
|
||||
checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon"
|
||||
version = "1.8.0"
|
||||
version = "1.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1"
|
||||
checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"crossbeam-deque",
|
||||
"either",
|
||||
"rayon-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rayon-core"
|
||||
version = "1.12.0"
|
||||
version = "1.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed"
|
||||
checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"crossbeam-deque",
|
||||
"crossbeam-utils",
|
||||
"num_cpus",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.10.2"
|
||||
version = "1.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
|
||||
checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.3"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-syntax",
|
||||
]
|
||||
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.8.2"
|
||||
version = "0.6.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
||||
checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.15"
|
||||
version = "1.0.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
|
||||
checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
|
||||
|
||||
[[package]]
|
||||
name = "same-file"
|
||||
|
@ -375,15 +404,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.2.0"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.193"
|
||||
version = "1.0.145"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
|
||||
checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
@ -400,9 +429,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.193"
|
||||
version = "1.0.145"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
|
||||
checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -411,20 +440,20 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.108"
|
||||
version = "1.0.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"
|
||||
checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"itoa 1.0.4",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.39"
|
||||
version = "1.0.102"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
|
||||
checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -442,9 +471,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tinystr"
|
||||
version = "0.7.5"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "83c02bf3c538ab32ba913408224323915f4ef9a6d61c0e85d493f355921c0ece"
|
||||
checksum = "f8aeafdfd935e4a7fe16a91ab711fa52d54df84f9c8f7ca5837a9d1d902ef4c2"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
]
|
||||
|
@ -461,7 +490,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "unic-langid-impl"
|
||||
version = "0.9.3"
|
||||
version = "0.9.1"
|
||||
dependencies = [
|
||||
"criterion",
|
||||
"serde",
|
||||
|
@ -471,31 +500,32 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.12"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
||||
checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
version = "0.1.11"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85"
|
||||
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
|
||||
|
||||
[[package]]
|
||||
name = "walkdir"
|
||||
version = "2.4.0"
|
||||
version = "2.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee"
|
||||
checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
|
||||
dependencies = [
|
||||
"same-file",
|
||||
"winapi",
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.89"
|
||||
version = "0.2.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e"
|
||||
checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"wasm-bindgen-macro",
|
||||
|
@ -503,9 +533,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.89"
|
||||
version = "0.2.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826"
|
||||
checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"log",
|
||||
|
@ -518,9 +548,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.89"
|
||||
version = "0.2.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2"
|
||||
checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
|
@ -528,9 +558,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.89"
|
||||
version = "0.2.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283"
|
||||
checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -541,15 +571,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.89"
|
||||
version = "0.2.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f"
|
||||
checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.66"
|
||||
version = "0.3.60"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f"
|
||||
checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
|
@ -573,9 +603,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
|||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.6"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
|
||||
checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
|
|
@ -10,23 +10,21 @@
|
|||
# See Cargo.toml.orig for the original contents.
|
||||
|
||||
[package]
|
||||
edition = "2021"
|
||||
edition = "2018"
|
||||
name = "unic-langid-impl"
|
||||
version = "0.9.3"
|
||||
version = "0.9.1"
|
||||
authors = ["Zibi Braniecki <gandalf@mozilla.com>"]
|
||||
include = [
|
||||
"src/**/*",
|
||||
"benches/*.rs",
|
||||
"tests/*.rs",
|
||||
"Cargo.toml",
|
||||
"LICENSE-APACHE",
|
||||
"LICENSE-MIT",
|
||||
"README.md",
|
||||
]
|
||||
description = "API for managing Unicode Language Identifiers"
|
||||
readme = "README.md"
|
||||
categories = ["internationalization"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
license = "MIT/Apache-2.0"
|
||||
repository = "https://github.com/zbraniecki/unic-locale"
|
||||
|
||||
[[bin]]
|
||||
|
|
|
@ -1,201 +0,0 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1,23 +0,0 @@
|
|||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS 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. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
|
@ -1,29 +1,6 @@
|
|||
# cldr-misc-full
|
||||
|
||||
Other CLDR data not defined elsewhere
|
||||
This repository provides the a portion of the JSON distribution of CLDR locale data
|
||||
for internationalization.
|
||||
|
||||
This package contains all locales.
|
||||
|
||||
|
||||
[![NPM version](https://img.shields.io/npm/v/cldr-misc-full.svg?style=flat)](https://www.npmjs.org/package/cldr-misc-full)
|
||||
|
||||
## General Info
|
||||
|
||||
This is part of the JSON distribution of [CLDR](https://cldr.unicode.org/)
|
||||
locale data for internationalization
|
||||
|
||||
For full details, please see <https://github.com/unicode-org/cldr-json>
|
||||
|
||||
## Bug reports
|
||||
|
||||
CLDR does not use Github's issue tracking system to track bugs. If you find an error in
|
||||
the data contained here, please file a new ticket at [Unicode Jira](https://unicode-org.atlassian.net/projects/CLDR/issues)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 1991-2023 Unicode, Inc.
|
||||
[Terms of Use](http://www.unicode.org/copyright.html)
|
||||
|
||||
SPDX-License-Identifier: Unicode-DFS-2016
|
||||
|
||||
A copy of the license is included as [LICENSE](./LICENSE).
|
||||
Refer to the README at https://github.com/unicode-cldr/cldr-json for complete details.
|
||||
|
|
|
@ -2,7 +2,7 @@ use serde_json::Value;
|
|||
use std::collections::HashMap;
|
||||
use std::collections::HashSet;
|
||||
use std::fs;
|
||||
use unic_langid_impl::subtags::Script;
|
||||
use unic_langid_impl::subtags::{Language, Script};
|
||||
use unic_langid_impl::CharacterDirection;
|
||||
use unic_langid_impl::LanguageIdentifier;
|
||||
|
||||
|
@ -28,7 +28,6 @@ fn langid_to_direction_map(path: &str) -> HashMap<LanguageIdentifier, CharacterD
|
|||
{
|
||||
"right-to-left" => CharacterDirection::RTL,
|
||||
"left-to-right" => CharacterDirection::LTR,
|
||||
"top-to-bottom" => CharacterDirection::TTB,
|
||||
_ => unimplemented!("Encountered unknown directionality!"),
|
||||
};
|
||||
result.insert(langid, character_order);
|
||||
|
@ -36,19 +35,26 @@ fn langid_to_direction_map(path: &str) -> HashMap<LanguageIdentifier, CharacterD
|
|||
result
|
||||
}
|
||||
|
||||
fn check_all_script_variants(
|
||||
fn check_all_variants_rtl(
|
||||
map: &HashMap<LanguageIdentifier, CharacterDirection>,
|
||||
exp_dir: CharacterDirection,
|
||||
lang: Option<Language>,
|
||||
script: Option<Script>,
|
||||
) -> bool {
|
||||
for (langid, dir) in map.iter() {
|
||||
if let Some(reference_script) = script {
|
||||
if let Some(s) = langid.script {
|
||||
if reference_script == s && *dir != exp_dir {
|
||||
if reference_script == s && dir != &CharacterDirection::RTL {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Some(reference_lang) = lang {
|
||||
if langid.language == reference_lang && dir != &CharacterDirection::RTL {
|
||||
println!("{:#?}", langid);
|
||||
println!("{:#?}", lang);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
|
@ -57,61 +63,50 @@ fn main() {
|
|||
let path = "./data/cldr-misc-full/main/";
|
||||
let map = langid_to_direction_map(path);
|
||||
|
||||
let mut scripts_ltr = HashSet::new();
|
||||
let mut scripts_rtl = HashSet::new();
|
||||
let mut scripts_ttb = HashSet::new();
|
||||
let mut langs_rtl = HashSet::new();
|
||||
let mut scripts = HashSet::new();
|
||||
let mut langs = HashSet::new();
|
||||
|
||||
for (langid, dir) in map.iter() {
|
||||
let script = langid.script;
|
||||
if dir == &CharacterDirection::LTR {
|
||||
continue;
|
||||
}
|
||||
|
||||
let scripts = match dir {
|
||||
CharacterDirection::LTR => &mut scripts_ltr,
|
||||
CharacterDirection::RTL => {
|
||||
langs_rtl.insert(langid.language);
|
||||
&mut scripts_rtl
|
||||
}
|
||||
CharacterDirection::TTB => &mut scripts_ttb,
|
||||
};
|
||||
let script = langid.script;
|
||||
|
||||
if let Some(script) = script {
|
||||
if scripts.contains(&script) {
|
||||
continue;
|
||||
}
|
||||
assert!(
|
||||
check_all_script_variants(&map, *dir, Some(script)),
|
||||
check_all_variants_rtl(&map, None, Some(script)),
|
||||
"We didn't expect a script with two directionalities!"
|
||||
);
|
||||
scripts.insert(script);
|
||||
continue;
|
||||
}
|
||||
|
||||
let lang = langid.language;
|
||||
|
||||
if langs.contains(&lang) {
|
||||
continue;
|
||||
}
|
||||
|
||||
assert!(
|
||||
check_all_variants_rtl(&map, Some(lang), None),
|
||||
"We didn't expect a language with two directionalities!"
|
||||
);
|
||||
langs.insert(lang);
|
||||
}
|
||||
|
||||
let mut scripts_ltr: Vec<String> = scripts_ltr
|
||||
let mut scripts: Vec<String> = scripts
|
||||
.into_iter()
|
||||
.map(|s| {
|
||||
let v: u32 = s.into();
|
||||
v.to_string()
|
||||
})
|
||||
.collect();
|
||||
scripts_ltr.sort();
|
||||
let mut scripts_rtl: Vec<String> = scripts_rtl
|
||||
.into_iter()
|
||||
.map(|s| {
|
||||
let v: u32 = s.into();
|
||||
v.to_string()
|
||||
})
|
||||
.collect();
|
||||
scripts_rtl.sort();
|
||||
let mut scripts_ttb: Vec<String> = scripts_ttb
|
||||
.into_iter()
|
||||
.map(|s| {
|
||||
let v: u32 = s.into();
|
||||
v.to_string()
|
||||
})
|
||||
.collect();
|
||||
scripts_ttb.sort();
|
||||
let mut langs_rtl: Vec<String> = langs_rtl
|
||||
scripts.sort();
|
||||
let mut langs: Vec<String> = langs
|
||||
.into_iter()
|
||||
.map(|s| {
|
||||
let v: Option<u64> = s.into();
|
||||
|
@ -119,29 +114,17 @@ fn main() {
|
|||
v.to_string()
|
||||
})
|
||||
.collect();
|
||||
langs_rtl.sort();
|
||||
|
||||
println!(
|
||||
"pub const SCRIPTS_CHARACTER_DIRECTION_LTR: [u32; {}] = [{}];",
|
||||
scripts_ltr.len(),
|
||||
scripts_ltr.join(", ")
|
||||
);
|
||||
langs.sort();
|
||||
|
||||
println!(
|
||||
"pub const SCRIPTS_CHARACTER_DIRECTION_RTL: [u32; {}] = [{}];",
|
||||
scripts_rtl.len(),
|
||||
scripts_rtl.join(", ")
|
||||
);
|
||||
|
||||
println!(
|
||||
"pub const SCRIPTS_CHARACTER_DIRECTION_TTB: [u32; {}] = [{}];",
|
||||
scripts_ttb.len(),
|
||||
scripts_ttb.join(", ")
|
||||
scripts.len(),
|
||||
scripts.join(", ")
|
||||
);
|
||||
|
||||
println!(
|
||||
"pub const LANGS_CHARACTER_DIRECTION_RTL: [u64; {}] = [{}];",
|
||||
langs_rtl.len(),
|
||||
langs_rtl.join(", ")
|
||||
langs.len(),
|
||||
langs.join(", ")
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
pub const SCRIPTS_CHARACTER_DIRECTION_LTR: [u32; 16] = [
|
||||
1635149124, 1635349071, 1735288130, 1735288404, 1768256589, 1768513878, 1801677903, 1819441475,
|
||||
1853120844, 1886285128, 1936613704, 1953390920, 1953657668, 1970038100, 1970435399, 2002872403,
|
||||
];
|
||||
pub const SCRIPTS_CHARACTER_DIRECTION_RTL: [u32; 4] =
|
||||
[1650553409, 1734897490, 1835820097, 1869572942];
|
||||
pub const SCRIPTS_CHARACTER_DIRECTION_TTB: [u32; 1] = [1735290701];
|
||||
pub const LANGS_CHARACTER_DIRECTION_RTL: [u64; 29] = [
|
||||
24934, 24936, 24944, 25715, 25960, 26214, 26485, 27001, 28002, 29281, 29301, 29547, 29549,
|
||||
29552, 30308, 31329, 31349, 6450019, 6516833, 6517356, 6776946, 6841459, 7102818, 7235426,
|
||||
7240301, 7303534, 7498611, 7502195, 7828084,
|
||||
pub const SCRIPTS_CHARACTER_DIRECTION_RTL: [u32; 1] = [1650553409];
|
||||
pub const LANGS_CHARACTER_DIRECTION_RTL: [u64; 12] = [
|
||||
24934, 25715, 25960, 26485, 27001, 29281, 29301, 29547, 29552, 6450019, 6517356, 7240301,
|
||||
];
|
||||
|
|
|
@ -14,7 +14,7 @@ use std::iter::Peekable;
|
|||
use std::str::FromStr;
|
||||
|
||||
/// Enum representing available character direction orientations.
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum CharacterDirection {
|
||||
/// Right To Left
|
||||
///
|
||||
|
@ -24,10 +24,6 @@ pub enum CharacterDirection {
|
|||
///
|
||||
/// Used in languages such as French, Spanish, English, German etc.
|
||||
LTR,
|
||||
/// Top To Bottom
|
||||
///
|
||||
/// Used in Traditional Mongolian
|
||||
TTB,
|
||||
}
|
||||
|
||||
type PartsTuple = (
|
||||
|
@ -246,7 +242,7 @@ impl LanguageIdentifier {
|
|||
) -> bool {
|
||||
let other = other.as_ref();
|
||||
self.language
|
||||
.matches(other.language, self_as_range, other_as_range)
|
||||
.matches(&other.language, self_as_range, other_as_range)
|
||||
&& subtag_matches(&self.script, &other.script, self_as_range, other_as_range)
|
||||
&& subtag_matches(&self.region, &other.region, self_as_range, other_as_range)
|
||||
&& subtags_match(
|
||||
|
@ -276,7 +272,7 @@ impl LanguageIdentifier {
|
|||
/// ```
|
||||
pub fn variants(&self) -> impl ExactSizeIterator<Item = &subtags::Variant> {
|
||||
let variants: &[_] = match self.variants {
|
||||
Some(ref v) => v,
|
||||
Some(ref v) => &**v,
|
||||
None => &[],
|
||||
};
|
||||
|
||||
|
@ -417,21 +413,11 @@ impl LanguageIdentifier {
|
|||
/// ```
|
||||
pub fn character_direction(&self) -> CharacterDirection {
|
||||
match (self.language.into(), self.script) {
|
||||
(_, Some(script))
|
||||
if layout_table::SCRIPTS_CHARACTER_DIRECTION_LTR.contains(&script.into()) =>
|
||||
{
|
||||
CharacterDirection::LTR
|
||||
}
|
||||
(_, Some(script))
|
||||
if layout_table::SCRIPTS_CHARACTER_DIRECTION_RTL.contains(&script.into()) =>
|
||||
{
|
||||
CharacterDirection::RTL
|
||||
}
|
||||
(_, Some(script))
|
||||
if layout_table::SCRIPTS_CHARACTER_DIRECTION_TTB.contains(&script.into()) =>
|
||||
{
|
||||
CharacterDirection::TTB
|
||||
}
|
||||
(Some(lang), _) if layout_table::LANGS_CHARACTER_DIRECTION_RTL.contains(&lang) => {
|
||||
CharacterDirection::RTL
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -12,7 +12,7 @@ impl Language {
|
|||
let slen = v.len();
|
||||
|
||||
let s = TinyStr8::from_bytes(v).map_err(|_| ParserError::InvalidLanguage)?;
|
||||
if !(2..=8).contains(&slen) || slen == 4 || !s.is_ascii_alphabetic() {
|
||||
if slen < 2 || slen > 8 || slen == 4 || !s.is_ascii_alphabetic() {
|
||||
return Err(ParserError::InvalidLanguage);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ impl Variant {
|
|||
pub fn from_bytes(v: &[u8]) -> Result<Self, ParserError> {
|
||||
let slen = v.len();
|
||||
|
||||
if !(4..=8).contains(&slen) {
|
||||
if slen < 4 || slen > 8 {
|
||||
return Err(ParserError::InvalidSubtag);
|
||||
}
|
||||
|
||||
|
|
|
@ -146,20 +146,10 @@ fn test_matches_as_range() {
|
|||
|
||||
#[test]
|
||||
fn test_character_direction() {
|
||||
let en_us: LanguageIdentifier = "en-US".parse().unwrap();
|
||||
assert_eq!(en_us.character_direction(), CharacterDirection::LTR);
|
||||
|
||||
let ar_af: LanguageIdentifier = "ar-AF".parse().unwrap();
|
||||
assert_eq!(ar_af.character_direction(), CharacterDirection::RTL);
|
||||
|
||||
let ks: LanguageIdentifier = "ks".parse().unwrap();
|
||||
assert_eq!(ks.character_direction(), CharacterDirection::RTL);
|
||||
|
||||
let ks_deva: LanguageIdentifier = "ks-Deva".parse().unwrap();
|
||||
assert_eq!(ks_deva.character_direction(), CharacterDirection::LTR);
|
||||
|
||||
let mn_mong: LanguageIdentifier = "mn-Mong".parse().unwrap();
|
||||
assert_eq!(mn_mong.character_direction(), CharacterDirection::TTB);
|
||||
let langid: LanguageIdentifier = "en-US".parse().unwrap();
|
||||
let langid2: LanguageIdentifier = "ar-AF".parse().unwrap();
|
||||
assert_eq!(langid.character_direction(), CharacterDirection::LTR);
|
||||
assert_eq!(langid2.character_direction(), CharacterDirection::RTL);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -32,10 +32,10 @@ static STRINGS: &[(&str, Option<&str>)] = &[
|
|||
("en-Latn-DE", None),
|
||||
("pl-FR", Some("pl-Latn-FR")),
|
||||
("de-CH", Some("de-Latn-CH")),
|
||||
("tuq", Some("tuq-Latn-TD")),
|
||||
("tuq", Some("tuq-Latn")),
|
||||
("sr-ME", Some("sr-Latn-ME")),
|
||||
("ng", Some("ng-Latn-NA")),
|
||||
("klx", Some("klx-Latn-PG")),
|
||||
("klx", Some("klx-Latn")),
|
||||
("kk-Arab", Some("kk-Arab-CN")),
|
||||
("en-Cyrl", Some("en-Cyrl-US")),
|
||||
("und-Cyrl-UK", Some("ru-Cyrl-UK")),
|
||||
|
@ -95,7 +95,7 @@ fn maximize_test() {
|
|||
|
||||
#[test]
|
||||
fn version_works() {
|
||||
assert_eq!(CLDR_VERSION, "44");
|
||||
assert_eq!(CLDR_VERSION, "36");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"files":{"Cargo.toml":"f235808fb0c8aef6f45f80c9b1bbb98cf83f2bd3e4ae493297b4dabb0b182b1e","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"f68b87b732b8a0d7fe6bc3b4ff5989207e87bd51f98220136ced4cd65f814f7c","src/lib.rs":"af8a91215b975e94cfff7282d948ed74236c1cb10ad047df583ea1b01e2fe4cd","tests/langid.rs":"0814412a7968a53123c6220f892b4d7e0a7859057dc69cb92cd1cdad343dada8"},"package":"887622f8e7b723780c5e64b04dcc0c9b8f426ada7cca6790cd3ea3bf0f08037a"}
|
||||
{"files":{"Cargo.toml":"22c66abe20079b152feec2c6e54c2026fcfe5b896fb20f7b45b1f5d11690aecd","README.md":"f68b87b732b8a0d7fe6bc3b4ff5989207e87bd51f98220136ced4cd65f814f7c","src/lib.rs":"af8a91215b975e94cfff7282d948ed74236c1cb10ad047df583ea1b01e2fe4cd"},"package":"398f9ad7239db44fd0f80fe068d12ff22d78354080332a5077dc6f52f14dcf2f"}
|
|
@ -10,23 +10,20 @@
|
|||
# See Cargo.toml.orig for the original contents.
|
||||
|
||||
[package]
|
||||
edition = "2021"
|
||||
edition = "2018"
|
||||
name = "unic-langid"
|
||||
version = "0.9.3"
|
||||
version = "0.9.1"
|
||||
authors = ["Zibi Braniecki <gandalf@mozilla.com>"]
|
||||
include = [
|
||||
"src/**/*",
|
||||
"benches/*.rs",
|
||||
"tests/*.rs",
|
||||
"Cargo.toml",
|
||||
"LICENSE-APACHE",
|
||||
"LICENSE-MIT",
|
||||
"README.md",
|
||||
]
|
||||
description = "API for managing Unicode Language Identifiers"
|
||||
readme = "README.md"
|
||||
categories = ["internationalization"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
license = "MIT/Apache-2.0"
|
||||
repository = "https://github.com/zbraniecki/unic-locale"
|
||||
|
||||
[dependencies.unic-langid-impl]
|
||||
|
|
|
@ -1,201 +0,0 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1,23 +0,0 @@
|
|||
Permission is hereby granted, free of charge, to any
|
||||
person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the
|
||||
Software without restriction, including without
|
||||
limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software
|
||||
is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions
|
||||
of the Software.
|
||||
|
||||
THE SOFTWARE IS 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. IN NO EVENT
|
||||
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
|
@ -1,72 +0,0 @@
|
|||
use unic_langid::LanguageIdentifier;
|
||||
#[cfg(feature = "unic-langid-macros")]
|
||||
use unic_langid::{langid, langid_slice, langids};
|
||||
|
||||
#[test]
|
||||
fn basic_test() {
|
||||
let loc: LanguageIdentifier = "en-US".parse().expect("Malformed Language Identifier");
|
||||
assert_eq!(&loc.to_string(), "en-US");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "unic-langid-macros")]
|
||||
fn langid_macro_test() {
|
||||
let loc = langid!("en-US");
|
||||
assert_eq!(&loc.to_string(), "en-US");
|
||||
|
||||
// ensure it can be used in a const context
|
||||
const _: LanguageIdentifier = langid!("en-US");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "unic-langid-macros")]
|
||||
fn langids_macro_test() {
|
||||
let langids = langids!["en-US", "pl", "de-AT", "Pl-Latn-PL"];
|
||||
assert_eq!(langids.len(), 4);
|
||||
assert_eq!(langids.get(3).unwrap().language.as_str(), "pl");
|
||||
|
||||
// check trailing comma
|
||||
langids!["en-US", "pl",];
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "unic-langid-macros")]
|
||||
fn langid_slice_macro_test() {
|
||||
let langids = langids!["en-US", "pl", "de-AT", "Pl-Latn-PL"];
|
||||
|
||||
// ensure it can be used in a const context
|
||||
const CONST_LANGIDS: &[LanguageIdentifier] =
|
||||
langid_slice!["en-US", "pl", "de-AT", "Pl-Latn-PL"];
|
||||
assert_eq!(CONST_LANGIDS, langids.as_slice());
|
||||
|
||||
// check trailing comma
|
||||
let _ = langid_slice!["en-US", "pl",];
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn langid_ord() {
|
||||
let mut input = vec!["en-Latn", "en-US"];
|
||||
|
||||
let mut langids: Vec<LanguageIdentifier> = input.iter().map(|l| l.parse().unwrap()).collect();
|
||||
|
||||
assert_eq!(
|
||||
langids
|
||||
.iter()
|
||||
.map(|l: &LanguageIdentifier| l.to_string())
|
||||
.collect::<Vec<_>>(),
|
||||
&["en-Latn", "en-US"]
|
||||
);
|
||||
|
||||
input.sort();
|
||||
assert_eq!(input, &["en-Latn", "en-US"]);
|
||||
|
||||
langids.sort();
|
||||
|
||||
assert_eq!(
|
||||
langids
|
||||
.iter()
|
||||
.map(|l: &LanguageIdentifier| l.to_string())
|
||||
.collect::<Vec<_>>(),
|
||||
&["en-US", "en-Latn"]
|
||||
);
|
||||
}
|
Загрузка…
Ссылка в новой задаче