| { | ||
| "git": { | ||
| "sha1": "f4290a877dfcb0f87cad6de4abdd65f0cbb33c9c" | ||
| "sha1": "5e404744dd6c9dd7f86aac82586e3fa98ea75f7f" | ||
| }, | ||
| "path_in_vcs": "utils/zerovec" | ||
| } |
+3
-3
@@ -23,5 +23,5 @@ // This file is part of ICU4X. For terms of use, please see the file | ||
| let mut rng1 = Lcg64Xsh32::seed_from_u64(seed); | ||
| let mut rng2 = Lcg64Xsh32::seed_from_u64(rand::Rng::gen(&mut rng1)); | ||
| let mut rng2 = Lcg64Xsh32::seed_from_u64(rand::Rng::random(&mut rng1)); | ||
| let alpha_dist = Alphanumeric; | ||
| let len_dist = Uniform::from(lengths); | ||
| let len_dist = Uniform::try_from(lengths).expect("range out of bounds"); | ||
| let string_vec = len_dist | ||
@@ -38,3 +38,3 @@ .sample_iter(&mut rng1) | ||
| .collect(); | ||
| (string_vec, rand::Rng::gen(&mut rng1)) | ||
| (string_vec, rand::Rng::random(&mut rng1)) | ||
| } | ||
@@ -41,0 +41,0 @@ |
+94
-71
@@ -42,2 +42,8 @@ # This file is automatically @generated by Cargo. | ||
| [[package]] | ||
| name = "bitflags" | ||
| version = "2.9.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" | ||
| [[package]] | ||
| name = "bumpalo" | ||
@@ -95,5 +101,5 @@ version = "3.17.0" | ||
| name = "clap" | ||
| version = "4.5.31" | ||
| version = "4.4.18" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767" | ||
| checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" | ||
| dependencies = [ | ||
@@ -105,5 +111,5 @@ "clap_builder", | ||
| name = "clap_builder" | ||
| version = "4.5.31" | ||
| version = "4.4.18" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863" | ||
| checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" | ||
| dependencies = [ | ||
@@ -116,5 +122,5 @@ "anstyle", | ||
| name = "clap_lex" | ||
| version = "0.7.4" | ||
| version = "0.6.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" | ||
| checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" | ||
@@ -219,5 +225,5 @@ [[package]] | ||
| name = "either" | ||
| version = "1.14.0" | ||
| version = "1.15.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d" | ||
| checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" | ||
@@ -238,5 +244,5 @@ [[package]] | ||
| name = "getrandom" | ||
| version = "0.2.15" | ||
| version = "0.3.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" | ||
| checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" | ||
| dependencies = [ | ||
@@ -246,2 +252,3 @@ "cfg-if", | ||
| "libc", | ||
| "r-efi", | ||
| "wasi", | ||
@@ -263,5 +270,5 @@ "wasm-bindgen", | ||
| name = "hermit-abi" | ||
| version = "0.4.0" | ||
| version = "0.5.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" | ||
| checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08" | ||
@@ -276,5 +283,5 @@ [[package]] | ||
| name = "is-terminal" | ||
| version = "0.4.15" | ||
| version = "0.4.16" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "e19b23d53f35ce9f56aebc7d1bb4e6ac1e9c0db7ac85c8d1760c04379edced37" | ||
| checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" | ||
| dependencies = [ | ||
@@ -297,5 +304,5 @@ "hermit-abi", | ||
| name = "itoa" | ||
| version = "1.0.14" | ||
| version = "1.0.15" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" | ||
| checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" | ||
@@ -314,17 +321,17 @@ [[package]] | ||
| name = "libc" | ||
| version = "0.2.170" | ||
| version = "0.2.172" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" | ||
| checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" | ||
| [[package]] | ||
| name = "libm" | ||
| version = "0.2.11" | ||
| version = "0.2.15" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" | ||
| checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" | ||
| [[package]] | ||
| name = "log" | ||
| version = "0.4.26" | ||
| version = "0.4.27" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" | ||
| checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" | ||
@@ -349,11 +356,11 @@ [[package]] | ||
| name = "once_cell" | ||
| version = "1.20.3" | ||
| version = "1.21.3" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" | ||
| checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" | ||
| [[package]] | ||
| name = "oorandom" | ||
| version = "11.1.4" | ||
| version = "11.1.5" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" | ||
| checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" | ||
@@ -408,5 +415,5 @@ [[package]] | ||
| name = "ppv-lite86" | ||
| version = "0.2.20" | ||
| version = "0.2.21" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" | ||
| checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" | ||
| dependencies = [ | ||
@@ -418,5 +425,5 @@ "zerocopy", | ||
| name = "proc-macro2" | ||
| version = "1.0.93" | ||
| version = "1.0.95" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" | ||
| checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" | ||
| dependencies = [ | ||
@@ -428,5 +435,5 @@ "unicode-ident", | ||
| name = "quote" | ||
| version = "1.0.38" | ||
| version = "1.0.40" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" | ||
| checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" | ||
| dependencies = [ | ||
@@ -437,8 +444,13 @@ "proc-macro2", | ||
| [[package]] | ||
| name = "r-efi" | ||
| version = "5.2.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" | ||
| [[package]] | ||
| name = "rand" | ||
| version = "0.8.5" | ||
| version = "0.9.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" | ||
| checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" | ||
| dependencies = [ | ||
| "libc", | ||
| "rand_chacha", | ||
@@ -450,5 +462,5 @@ "rand_core", | ||
| name = "rand_chacha" | ||
| version = "0.3.1" | ||
| version = "0.9.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" | ||
| checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" | ||
| dependencies = [ | ||
@@ -461,5 +473,5 @@ "ppv-lite86", | ||
| name = "rand_core" | ||
| version = "0.6.4" | ||
| version = "0.9.3" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" | ||
| checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" | ||
| dependencies = [ | ||
@@ -471,5 +483,5 @@ "getrandom", | ||
| name = "rand_distr" | ||
| version = "0.4.3" | ||
| version = "0.5.1" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" | ||
| checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" | ||
| dependencies = [ | ||
@@ -482,5 +494,5 @@ "num-traits", | ||
| name = "rand_pcg" | ||
| version = "0.3.1" | ||
| version = "0.9.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" | ||
| checksum = "b48ac3f7ffaab7fac4d2376632268aa5f89abdb55f7ebf8f4d11fffccb2320f7" | ||
| dependencies = [ | ||
@@ -563,11 +575,11 @@ "rand_core", | ||
| name = "rustversion" | ||
| version = "1.0.19" | ||
| version = "1.0.20" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" | ||
| checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" | ||
| [[package]] | ||
| name = "ryu" | ||
| version = "1.0.19" | ||
| version = "1.0.20" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" | ||
| checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" | ||
@@ -585,5 +597,5 @@ [[package]] | ||
| name = "serde" | ||
| version = "1.0.218" | ||
| version = "1.0.219" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" | ||
| checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" | ||
| dependencies = [ | ||
@@ -595,5 +607,5 @@ "serde_derive", | ||
| name = "serde_derive" | ||
| version = "1.0.218" | ||
| version = "1.0.219" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" | ||
| checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" | ||
| dependencies = [ | ||
@@ -607,5 +619,5 @@ "proc-macro2", | ||
| name = "serde_json" | ||
| version = "1.0.139" | ||
| version = "1.0.140" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" | ||
| checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" | ||
| dependencies = [ | ||
@@ -626,5 +638,5 @@ "itoa", | ||
| name = "syn" | ||
| version = "2.0.98" | ||
| version = "2.0.101" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" | ||
| checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" | ||
| dependencies = [ | ||
@@ -638,5 +650,5 @@ "proc-macro2", | ||
| name = "synstructure" | ||
| version = "0.13.1" | ||
| version = "0.13.2" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" | ||
| checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" | ||
| dependencies = [ | ||
@@ -666,5 +678,5 @@ "proc-macro2", | ||
| name = "unicode-ident" | ||
| version = "1.0.17" | ||
| version = "1.0.18" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" | ||
| checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" | ||
@@ -683,5 +695,8 @@ [[package]] | ||
| name = "wasi" | ||
| version = "0.11.0+wasi-snapshot-preview1" | ||
| version = "0.14.2+wasi-0.2.4" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" | ||
| checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" | ||
| dependencies = [ | ||
| "wit-bindgen-rt", | ||
| ] | ||
@@ -839,2 +854,11 @@ [[package]] | ||
| [[package]] | ||
| name = "wit-bindgen-rt" | ||
| version = "0.39.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" | ||
| dependencies = [ | ||
| "bitflags", | ||
| ] | ||
| [[package]] | ||
| name = "yoke" | ||
@@ -864,7 +888,6 @@ version = "0.8.0" | ||
| name = "zerocopy" | ||
| version = "0.7.35" | ||
| version = "0.8.25" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" | ||
| checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" | ||
| dependencies = [ | ||
| "byteorder", | ||
| "zerocopy-derive", | ||
@@ -875,5 +898,5 @@ ] | ||
| name = "zerocopy-derive" | ||
| version = "0.7.35" | ||
| version = "0.8.25" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" | ||
| checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" | ||
| dependencies = [ | ||
@@ -887,5 +910,5 @@ "proc-macro2", | ||
| name = "zerofrom" | ||
| version = "0.1.5" | ||
| version = "0.1.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" | ||
| checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" | ||
| dependencies = [ | ||
@@ -897,5 +920,5 @@ "zerofrom-derive", | ||
| name = "zerofrom-derive" | ||
| version = "0.1.5" | ||
| version = "0.1.6" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" | ||
| checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" | ||
| dependencies = [ | ||
@@ -910,3 +933,3 @@ "proc-macro2", | ||
| name = "zerovec" | ||
| version = "0.11.1" | ||
| version = "0.11.2" | ||
| dependencies = [ | ||
@@ -913,0 +936,0 @@ "bincode", |
+8
-7
@@ -14,5 +14,5 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| edition = "2021" | ||
| rust-version = "1.81" | ||
| rust-version = "1.82" | ||
| name = "zerovec" | ||
| version = "0.11.1" | ||
| version = "0.11.2" | ||
| authors = ["The ICU4X Project Developers"] | ||
@@ -29,2 +29,3 @@ build = false | ||
| "README.md", | ||
| "build.rs", | ||
| ] | ||
@@ -158,4 +159,4 @@ autolib = false | ||
| [dev-dependencies.getrandom] | ||
| version = "0.2" | ||
| features = ["js"] | ||
| version = "0.3" | ||
| features = ["wasm_js"] | ||
@@ -171,9 +172,9 @@ [dev-dependencies.iai] | ||
| [dev-dependencies.rand] | ||
| version = "0.8" | ||
| version = "0.9" | ||
| [dev-dependencies.rand_distr] | ||
| version = "0.4" | ||
| version = "0.5" | ||
| [dev-dependencies.rand_pcg] | ||
| version = "0.3" | ||
| version = "0.9" | ||
@@ -180,0 +181,0 @@ [dev-dependencies.rmp-serde] |
+6
-6
@@ -22,3 +22,3 @@ # zerovec [](https://crates.io/crates/zerovec) | ||
| The first two are intended as close-to-drop-in replacements for `Vec<T>` in Serde structs. The third and fourth are | ||
| intended as a replacement for `HashMap` or [`LiteMap`](docs.rs/litemap). When used with Serde derives, **be sure to apply | ||
| intended as a replacement for `HashMap` or [`LiteMap`](https://docs.rs/litemap). When used with Serde derives, **be sure to apply | ||
| `#[serde(borrow)]` to these types**, same as one would for [`Cow<'a, T>`]. | ||
@@ -39,8 +39,8 @@ | ||
| This crate has several optional Cargo features: | ||
| - `serde`: Allows serializing and deserializing `zerovec`'s abstractions via [`serde`](https://docs.rs/serde) | ||
| - `yoke`: Enables implementations of `Yokeable` from the [`yoke`](https://docs.rs/yoke/) crate, which is also useful | ||
| in situations involving a lot of zero-copy deserialization. | ||
| - `serde`: Allows serializing and deserializing `zerovec`'s abstractions via [`serde`](https://docs.rs/serde) | ||
| - `yoke`: Enables implementations of `Yokeable` from the [`yoke`](https://docs.rs/yoke/) crate, which is also useful | ||
| in situations involving a lot of zero-copy deserialization. | ||
| - `derive`: Makes it easier to use custom types in these collections by providing the `#[make_ule]` and | ||
| `#[make_varule]` proc macros, which generate appropriate [`ULE`](https://docs.rs/zerovec/latest/zerovec/ule/trait.ULE.html) and | ||
| [`VarULE`](https://docs.rs/zerovec/latest/zerovec/ule/trait.VarULE.html)-conformant types for a given "normal" type. | ||
| `#[make_varule]` proc macros, which generate appropriate [`ULE`](https://docs.rs/zerovec/latest/zerovec/ule/trait.ULE.html) and | ||
| [`VarULE`](https://docs.rs/zerovec/latest/zerovec/ule/trait.VarULE.html)-conformant types for a given "normal" type. | ||
| - `std`: Enabled `std::Error` implementations for error types. This crate is by default `no_std` with a dependency on `alloc`. | ||
@@ -47,0 +47,0 @@ |
@@ -221,3 +221,3 @@ // This file is part of ICU4X. For terms of use, please see the file | ||
| use crate::ule::AsULE; | ||
| use rand::{distributions::Standard, Rng, SeedableRng}; | ||
| use rand::{distr::StandardUniform, Rng, SeedableRng}; | ||
| use rand_pcg::Lcg64Xsh32; | ||
@@ -230,3 +230,3 @@ | ||
| let rng = Lcg64Xsh32::seed_from_u64(seed); | ||
| let kv: Vec<(u64, u64)> = rng.sample_iter(&Standard).take(N).collect(); | ||
| let kv: Vec<(u64, u64)> = rng.sample_iter(&StandardUniform).take(N).collect(); | ||
| let hashmap: ZeroHashMap<u64, u64> = | ||
@@ -233,0 +233,0 @@ ZeroHashMap::from_iter(kv.iter().map(|e| (&e.0, &e.1))); |
+6
-6
@@ -22,3 +22,3 @@ // This file is part of ICU4X. For terms of use, please see the file | ||
| //! The first two are intended as close-to-drop-in replacements for `Vec<T>` in Serde structs. The third and fourth are | ||
| //! intended as a replacement for `HashMap` or [`LiteMap`](docs.rs/litemap). When used with Serde derives, **be sure to apply | ||
| //! intended as a replacement for `HashMap` or [`LiteMap`](https://docs.rs/litemap). When used with Serde derives, **be sure to apply | ||
| //! `#[serde(borrow)]` to these types**, same as one would for [`Cow<'a, T>`]. | ||
@@ -39,8 +39,8 @@ //! | ||
| //! This crate has several optional Cargo features: | ||
| //! - `serde`: Allows serializing and deserializing `zerovec`'s abstractions via [`serde`](https://docs.rs/serde) | ||
| //! - `yoke`: Enables implementations of `Yokeable` from the [`yoke`](https://docs.rs/yoke/) crate, which is also useful | ||
| //! in situations involving a lot of zero-copy deserialization. | ||
| //! - `serde`: Allows serializing and deserializing `zerovec`'s abstractions via [`serde`](https://docs.rs/serde) | ||
| //! - `yoke`: Enables implementations of `Yokeable` from the [`yoke`](https://docs.rs/yoke/) crate, which is also useful | ||
| //! in situations involving a lot of zero-copy deserialization. | ||
| //! - `derive`: Makes it easier to use custom types in these collections by providing the [`#[make_ule]`](crate::make_ule) and | ||
| //! [`#[make_varule]`](crate::make_varule) proc macros, which generate appropriate [`ULE`](crate::ule::ULE) and | ||
| //! [`VarULE`](crate::ule::VarULE)-conformant types for a given "normal" type. | ||
| //! [`#[make_varule]`](crate::make_varule) proc macros, which generate appropriate [`ULE`](crate::ule::ULE) and | ||
| //! [`VarULE`](crate::ule::VarULE)-conformant types for a given "normal" type. | ||
| //! - `std`: Enabled `std::Error` implementations for error types. This crate is by default `no_std` with a dependency on `alloc`. | ||
@@ -47,0 +47,0 @@ //! |
@@ -42,2 +42,8 @@ // This file is part of ICU4X. For terms of use, please see the file | ||
| /// | ||
| /// # Reverse-encoding VarULE | ||
| /// | ||
| /// This trait maps a struct to its bytes representation ("serialization"), and | ||
| /// [`ZeroFrom`](zerofrom::ZeroFrom) performs the opposite operation, taking those bytes and | ||
| /// creating a struct from them ("deserialization"). | ||
| /// | ||
| /// # Safety | ||
@@ -44,0 +50,0 @@ /// |
+6
-10
@@ -1091,3 +1091,3 @@ // This file is part of ICU4X. For terms of use, please see the file | ||
| /// * `$convert` - A const function that converts an `$aligned` into its unaligned equivalent, e.g., | ||
| /// `const fn from_aligned(a: CanonicalType) -> CanonicalType::ULE`. | ||
| /// const fn from_aligned(a: CanonicalType) -> CanonicalType::ULE`. | ||
| /// * `$x` - The elements that the `ZeroSlice` will hold. | ||
@@ -1124,12 +1124,8 @@ /// | ||
| macro_rules! zeroslice { | ||
| () => ( | ||
| () => { | ||
| $crate::ZeroSlice::new_empty() | ||
| ); | ||
| ($aligned:ty; $convert:expr; [$($x:expr),+ $(,)?]) => ( | ||
| $crate::ZeroSlice::<$aligned>::from_ule_slice( | ||
| {const X: &[<$aligned as $crate::ule::AsULE>::ULE] = &[ | ||
| $($convert($x)),* | ||
| ]; X} | ||
| ) | ||
| ); | ||
| }; | ||
| ($aligned:ty; $convert:expr; [$($x:expr),+ $(,)?]) => { | ||
| $crate::ZeroSlice::<$aligned>::from_ule_slice(const { &[$($convert($x)),*] }) | ||
| }; | ||
| } | ||
@@ -1136,0 +1132,0 @@ |
Sorry, the diff of this file is not supported yet