Sign In

zerovec

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zerovec - cargo Package Compare versions

Comparing version
0.11.4
to
0.11.5
+2
-1
.cargo_vcs_info.json
{
"git": {
"sha1": "23b31cd3b6fe6d6d58e9211e0c87689194638efd"
"sha1": "29dfe2790b6cfdab94ca6a6b69f58ce54802dbf7",
"dirty": true
},
"path_in_vcs": "utils/zerovec"
}
+27
-804

@@ -6,193 +6,2 @@ # This file is automatically @generated by Cargo.

[[package]]
name = "aho-corasick"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
[[package]]
name = "anes"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
[[package]]
name = "anstyle"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "autocfg"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]]
name = "bitflags"
version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
[[package]]
name = "bumpalo"
version = "3.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cast"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "ciborium"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e"
dependencies = [
"ciborium-io",
"ciborium-ll",
"serde",
]
[[package]]
name = "ciborium-io"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757"
[[package]]
name = "ciborium-ll"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9"
dependencies = [
"ciborium-io",
"half",
]
[[package]]
name = "clap"
version = "4.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c"
dependencies = [
"clap_builder",
]
[[package]]
name = "clap_builder"
version = "4.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7"
dependencies = [
"anstyle",
"clap_lex",
]
[[package]]
name = "clap_lex"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1"
[[package]]
name = "cobs"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15"
[[package]]
name = "criterion"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f"
dependencies = [
"anes",
"cast",
"ciborium",
"clap",
"criterion-plot",
"is-terminal",
"itertools",
"num-traits",
"once_cell",
"oorandom",
"plotters",
"rayon",
"regex",
"serde",
"serde_derive",
"serde_json",
"tinytemplate",
"walkdir",
]
[[package]]
name = "criterion-plot"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
dependencies = [
"cast",
"itertools",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crunchy"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929"
[[package]]
name = "databake"

@@ -221,197 +30,6 @@ version = "0.2.0"

[[package]]
name = "either"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
[[package]]
name = "embedded-io"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced"
[[package]]
name = "embedded-io"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
[[package]]
name = "getrandom"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0"
dependencies = [
"cfg-if",
"js-sys",
"libc",
"r-efi",
"wasi",
"wasm-bindgen",
]
[[package]]
name = "half"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
dependencies = [
"cfg-if",
"crunchy",
]
[[package]]
name = "hermit-abi"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08"
[[package]]
name = "iai"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "71a816c97c42258aa5834d07590b718b4c9a598944cd39a52dc25b351185d678"
[[package]]
name = "is-terminal"
version = "0.4.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9"
dependencies = [
"hermit-abi",
"libc",
"windows-sys",
]
[[package]]
name = "itertools"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
"either",
]
[[package]]
name = "itoa"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
[[package]]
name = "js-sys"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
dependencies = [
"once_cell",
"wasm-bindgen",
]
[[package]]
name = "libc"
version = "0.2.172"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
[[package]]
name = "libm"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"
[[package]]
name = "log"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
[[package]]
name = "memchr"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
"libm",
]
[[package]]
name = "once_cell"
version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]
name = "oorandom"
version = "11.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
[[package]]
name = "paste"
version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "plotters"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747"
dependencies = [
"num-traits",
"plotters-backend",
"plotters-svg",
"wasm-bindgen",
"web-sys",
]
[[package]]
name = "plotters-backend"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a"
[[package]]
name = "plotters-svg"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670"
dependencies = [
"plotters-backend",
]
[[package]]
name = "postcard"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8"
dependencies = [
"cobs",
"embedded-io 0.4.0",
"embedded-io 0.6.1",
"serde",
]
[[package]]
name = "ppv-lite86"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
dependencies = [
"zerocopy",
]
[[package]]
name = "proc-macro2"
version = "1.0.95"
version = "1.0.103"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
dependencies = [

@@ -423,5 +41,5 @@ "unicode-ident",

name = "quote"
version = "1.0.40"
version = "1.0.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
dependencies = [

@@ -432,153 +50,17 @@ "proc-macro2",

[[package]]
name = "r-efi"
version = "5.2.0"
name = "serde"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
[[package]]
name = "rand"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97"
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
"rand_chacha",
"rand_core",
"serde_core",
"serde_derive",
]
[[package]]
name = "rand_chacha"
version = "0.9.0"
name = "serde_core"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"ppv-lite86",
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
dependencies = [
"getrandom",
]
[[package]]
name = "rand_distr"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463"
dependencies = [
"num-traits",
"rand",
]
[[package]]
name = "rand_pcg"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b48ac3f7ffaab7fac4d2376632268aa5f89abdb55f7ebf8f4d11fffccb2320f7"
dependencies = [
"rand_core",
]
[[package]]
name = "rayon"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]]
name = "regex"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "rmp"
version = "0.8.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4"
dependencies = [
"byteorder",
"num-traits",
"paste",
]
[[package]]
name = "rmp-serde"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db"
dependencies = [
"byteorder",
"rmp",
"serde",
]
[[package]]
name = "rustversion"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2"
[[package]]
name = "ryu"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
[[package]]
name = "same-file"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
dependencies = [
"winapi-util",
]
[[package]]
name = "serde"
version = "1.0.219"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6"
dependencies = [
"serde_derive",

@@ -589,5 +71,5 @@ ]

name = "serde_derive"
version = "1.0.219"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00"
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [

@@ -600,24 +82,12 @@ "proc-macro2",

[[package]]
name = "serde_json"
version = "1.0.140"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
]
[[package]]
name = "stable_deref_trait"
version = "1.2.0"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
[[package]]
name = "syn"
version = "2.0.101"
version = "2.0.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf"
checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917"
dependencies = [

@@ -641,245 +111,23 @@ "proc-macro2",

[[package]]
name = "tinytemplate"
version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
dependencies = [
"serde",
"serde_json",
]
[[package]]
name = "twox-hash"
version = "2.1.0"
version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7b17f197b3050ba473acf9181f7b1d3b66d1cf7356c6cc57886662276e65908"
checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c"
[[package]]
name = "unicode-ident"
version = "1.0.18"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06"
[[package]]
name = "walkdir"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
dependencies = [
"same-file",
"winapi-util",
]
[[package]]
name = "wasi"
version = "0.14.2+wasi-0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3"
dependencies = [
"wit-bindgen-rt",
]
[[package]]
name = "wasm-bindgen"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
dependencies = [
"bumpalo",
"log",
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
dependencies = [
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
dependencies = [
"unicode-ident",
]
[[package]]
name = "web-sys"
version = "0.3.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
dependencies = [
"js-sys",
"wasm-bindgen",
]
[[package]]
name = "winapi-util"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"windows-sys",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[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"
version = "0.8.0"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc"
checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954"
dependencies = [
"stable_deref_trait",
"yoke-derive",
"zerofrom",
]
[[package]]
name = "yoke-derive"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6"
dependencies = [
"proc-macro2",
"quote",
"syn",
"synstructure",
]
[[package]]
name = "zerocopy"
version = "0.8.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.8.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "zerofrom"

@@ -889,34 +137,9 @@ version = "0.1.6"

checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
dependencies = [
"zerofrom-derive",
]
[[package]]
name = "zerofrom-derive"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
dependencies = [
"proc-macro2",
"quote",
"syn",
"synstructure",
]
[[package]]
name = "zerovec"
version = "0.11.4"
version = "0.11.5"
dependencies = [
"bincode",
"criterion",
"databake",
"getrandom",
"iai",
"postcard",
"rand",
"rand_distr",
"rand_pcg",
"rmp-serde",
"serde",
"serde_json",
"twox-hash",

@@ -930,5 +153,5 @@ "yoke",

name = "zerovec-derive"
version = "0.11.1"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f"
checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
dependencies = [

@@ -935,0 +158,0 @@ "proc-macro2",

@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO

name = "zerovec"
version = "0.11.4"
version = "0.11.5"
authors = ["The ICU4X Project Developers"]

@@ -54,4 +54,4 @@ build = false

[package.metadata.cargo-all-features]
max_combination_size = 3
[package.metadata.workspaces]
independent = true

@@ -61,7 +61,7 @@ [package.metadata.docs.rs]

[package.metadata.workspaces]
independent = true
[package.metadata.cargo-all-features]
max_combination_size = 3
[features]
alloc = []
alloc = ["serde?/alloc"]
databake = ["dep:databake"]

@@ -73,6 +73,3 @@ derive = ["dep:zerovec-derive"]

]
serde = [
"dep:serde",
"alloc",
]
serde = ["dep:serde"]
std = []

@@ -129,7 +126,4 @@ yoke = ["dep:yoke"]

[dependencies.serde]
version = "1.0.110"
features = [
"alloc",
"derive",
]
version = "1.0.220"
features = ["derive"]
optional = true

@@ -157,44 +151,1 @@ default-features = false

default-features = false
[dev-dependencies.bincode]
version = "1.3.1"
[dev-dependencies.getrandom]
version = "0.3"
features = ["wasm_js"]
[dev-dependencies.iai]
version = "0.1.1"
[dev-dependencies.postcard]
version = "1.0.3"
features = ["use-std"]
default-features = false
[dev-dependencies.rand]
version = "0.9"
[dev-dependencies.rand_distr]
version = "0.5"
[dev-dependencies.rand_pcg]
version = "0.9"
[dev-dependencies.rmp-serde]
version = "1.2.0"
[dev-dependencies.serde]
version = "1.0.110"
features = ["derive"]
default-features = false
[dev-dependencies.serde_json]
version = "1.0.45"
[dev-dependencies.yoke]
version = "0.8.0"
features = ["derive"]
default-features = false
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.criterion]
version = "0.5.0"

@@ -125,2 +125,4 @@ // This file is part of ICU4X. For terms of use, please see the file

/// Construct from an owned slice. Errors if the slice doesn't represent a valid `V`
///
/// ✨ *Enabled with the `alloc` Cargo feature.*
#[cfg(feature = "alloc")]

@@ -172,2 +174,4 @@ pub fn parse_owned_bytes(bytes: Box<[u8]>) -> Result<Self, UleError> {

/// Will always construct an owned version
///
/// ✨ *Enabled with the `alloc` Cargo feature.*
#[cfg(feature = "alloc")]

@@ -188,2 +192,4 @@ pub fn from_encodeable<E: EncodeAsVarULE<V>>(encodeable: &E) -> Self {

/// Construct a new borrowed version of this
///
/// ✨ *Enabled with the `alloc` Cargo feature.*
#[cfg(feature = "alloc")]

@@ -335,3 +341,3 @@ pub fn new_owned(val: Box<V>) -> Self {

#[cfg(feature = "serde")]
#[cfg(all(feature = "serde", feature = "alloc"))]
impl<'a, 'de: 'a, V: VarULE + ?Sized> serde::Deserialize<'de> for VarZeroCow<'a, V>

@@ -338,0 +344,0 @@ where

@@ -74,2 +74,6 @@ // This file is part of ICU4X. For terms of use, please see the file

#[derive(Serialize, Deserialize)]
#[allow(
dead_code,
reason = "Tests compatibility of custom impl with Serde derive."
)]
struct DeriveTestZeroHashMap<'data> {

@@ -76,0 +80,0 @@ #[serde(borrow)]

@@ -61,6 +61,4 @@ // This file is part of ICU4X. For terms of use, please see the file

}
serde::serde_if_integer128! {
fn serialize_i128(self, _value: i128) -> Result<Self::Ok, Self::Error> {
Ok(())
}
fn serialize_i128(self, _value: i128) -> Result<Self::Ok, Self::Error> {
Ok(())
}

@@ -79,6 +77,4 @@ fn serialize_u8(self, _value: u8) -> Result<Self::Ok, Self::Error> {

}
serde::serde_if_integer128! {
fn serialize_u128(self, _value: u128) -> Result<Self::Ok, Self::Error> {
Ok(())
}
fn serialize_u128(self, _value: u128) -> Result<Self::Ok, Self::Error> {
Ok(())
}

@@ -85,0 +81,0 @@ fn serialize_f32(self, _value: f32) -> Result<Self::Ok, Self::Error> {

@@ -239,2 +239,6 @@ // This file is part of ICU4X. For terms of use, please see the file

#[derive(serde::Serialize, serde::Deserialize)]
#[expect(
dead_code,
reason = "Tests compatibility of custom impl with Serde derive."
)]
struct DeriveTest_ZeroMap<'data> {

@@ -246,2 +250,6 @@ #[serde(borrow)]

#[derive(serde::Serialize, serde::Deserialize)]
#[expect(
dead_code,
reason = "Tests compatibility of custom impl with Serde derive."
)]
struct DeriveTest_ZeroMapBorrowed<'data> {

@@ -248,0 +256,0 @@ #[serde(borrow)]

@@ -221,4 +221,4 @@ // This file is part of ICU4X. For terms of use, please see the file

/// let borrowed = map.as_borrowed();
/// assert!(matches!(borrowed.get0(&1), Some(_)));
/// assert!(matches!(borrowed.get0(&3), None));
/// assert!(borrowed.get0(&1).is_some());
/// assert!(borrowed.get0(&3).is_none());
/// ```

@@ -240,4 +240,4 @@ #[inline]

/// let borrowed = map.as_borrowed();
/// assert!(matches!(borrowed.get0_by(|probe| probe.cmp(&1)), Some(_)));
/// assert!(matches!(borrowed.get0_by(|probe| probe.cmp(&3)), None));
/// assert!(borrowed.get0_by(|probe| probe.cmp(&1)).is_some());
/// assert!(borrowed.get0_by(|probe| probe.cmp(&3)).is_none());
/// ```

@@ -244,0 +244,0 @@ pub fn get0_by<'l>(

@@ -309,3 +309,3 @@ // This file is part of ICU4X. For terms of use, please see the file

/// assert_eq!(map.insert(&1, "one", "baz").as_deref(), Some("bar"),);
/// assert_eq!(map.get_2d(&1, "one").as_deref(), Some("baz"));
/// assert_eq!(map.get_2d(&1, "one"), Some("baz"));
/// assert_eq!(map.len(), 2);

@@ -528,4 +528,4 @@ /// ```

/// map.insert(&2, "two", "bar");
/// assert!(matches!(map.get0_by(|probe| probe.cmp(&1)), Some(_)));
/// assert!(matches!(map.get0_by(|probe| probe.cmp(&3)), None));
/// assert!(map.get0_by(|probe| probe.cmp(&1)).is_some());
/// assert!(map.get0_by(|probe| probe.cmp(&3)).is_none());
/// ```

@@ -532,0 +532,0 @@ pub fn get0_by<'l>(

@@ -357,2 +357,6 @@ // This file is part of ICU4X. For terms of use, please see the file

#[derive(serde::Serialize, serde::Deserialize)]
#[allow(
dead_code,
reason = "We are testing that these types can be deserialized, and Tests compatibility of custom impl with Serde derive."
)]
struct DeriveTest_ZeroMap2d<'data> {

@@ -364,2 +368,6 @@ #[serde(borrow)]

#[derive(serde::Serialize, serde::Deserialize)]
#[allow(
dead_code,
reason = "We are testing that these types can be deserialized, and Tests compatibility of custom impl with Serde derive."
)]
struct DeriveTest_ZeroMap2dBorrowed<'data> {

@@ -366,0 +374,0 @@ #[serde(borrow)]

@@ -358,2 +358,4 @@ // This file is part of ICU4X. For terms of use, please see the file

/// Allocate on the heap as a `Box<T>`
///
/// ✨ *Enabled with the `alloc` Cargo feature.*
#[inline]

@@ -360,0 +362,0 @@ #[cfg(feature = "alloc")]

@@ -160,3 +160,3 @@ // This file is part of ICU4X. For terms of use, please see the file

/// The implementors guarantee that `N == core::mem::size_of::<Self>()`
/// [`repr(transparent)`] guarantees that the layout is same as [`Option<U>`]
/// `#[repr(transparent)]` guarantees that the layout is same as [`Option<U>`]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]

@@ -163,0 +163,0 @@ #[repr(transparent)]

@@ -202,3 +202,3 @@ // This file is part of ICU4X. For terms of use, please see the file

#[cfg(feature = "serde")]
#[cfg(all(feature = "serde", feature = "alloc"))]
impl<'de, $($T: VarULE + ?Sized,)+ Format> serde::Deserialize<'de> for alloc::boxed::Box<$name<$($T,)+ Format>>

@@ -205,0 +205,0 @@ where

@@ -251,3 +251,3 @@ // This file is part of ICU4X. For terms of use, please see the file

#[cfg(feature = "serde")]
#[cfg(all(feature = "serde", feature = "alloc"))]
impl<'de, A, V> serde::Deserialize<'de> for alloc::boxed::Box<VarTupleULE<A, V>>

@@ -254,0 +254,0 @@ where

@@ -29,2 +29,4 @@ // This file is part of ICU4X. For terms of use, please see the file

/// precise format of the backing buffer with various size and performance tradeoffs. It defaults to [`Index16`].
///
/// ✨ *Enabled with the `alloc` Cargo feature.*
pub struct VarZeroVecOwned<T: ?Sized, F = Index16> {

@@ -31,0 +33,0 @@ marker1: PhantomData<T>,

@@ -7,15 +7,22 @@ // This file is part of ICU4X. For terms of use, please see the file

use crate::ule::*;
#[cfg(feature = "alloc")]
use alloc::boxed::Box;
#[cfg(feature = "alloc")]
use alloc::vec::Vec;
use core::fmt;
use core::marker::PhantomData;
use serde::de::{self, Deserialize, Deserializer, SeqAccess, Visitor};
#[cfg(feature = "serde")]
#[cfg(feature = "alloc")]
use serde::de::SeqAccess;
use serde::de::{self, Deserialize, Deserializer, Visitor};
use serde::ser::{Serialize, SerializeSeq, Serializer};
struct VarZeroVecVisitor<T: ?Sized, F: VarZeroVecFormat> {
#[expect(clippy::type_complexity)] // this is a private marker type, who cares
marker: PhantomData<(fn() -> Box<T>, F)>,
marker: PhantomData<(fn() -> T, F)>,
}
#[cfg(feature = "alloc")]
struct VarZeroVecHumanVisitor<T: ?Sized, F: VarZeroVecFormat> {
marker: PhantomData<(fn() -> T, F)>,
}
impl<T: ?Sized, F: VarZeroVecFormat> Default for VarZeroVecVisitor<T, F> {

@@ -29,6 +36,14 @@ fn default() -> Self {

#[cfg(feature = "alloc")]
impl<T: ?Sized, F: VarZeroVecFormat> Default for VarZeroVecHumanVisitor<T, F> {
fn default() -> Self {
Self {
marker: PhantomData,
}
}
}
impl<'de, T, F> Visitor<'de> for VarZeroVecVisitor<T, F>
where
T: VarULE + ?Sized,
Box<T>: Deserialize<'de>,
F: VarZeroVecFormat,

@@ -48,3 +63,17 @@ {

}
}
#[cfg(feature = "alloc")]
impl<'de, T, F> Visitor<'de> for VarZeroVecHumanVisitor<T, F>
where
T: VarULE + ?Sized,
Box<T>: Deserialize<'de>,
F: VarZeroVecFormat,
{
type Value = VarZeroVec<'de, T, F>;
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
formatter.write_str("a sequence or borrowed buffer of bytes")
}
fn visit_seq<A>(self, mut seq: A) -> Result<Self::Value, A::Error>

@@ -67,2 +96,3 @@ where

/// This impl requires enabling the optional `serde` Cargo feature of the `zerovec` crate
#[cfg(feature = "alloc")]
impl<'de, 'a, T, F> Deserialize<'de> for VarZeroVec<'a, T, F>

@@ -79,7 +109,6 @@ where

{
let visitor = VarZeroVecVisitor::<T, F>::default();
if deserializer.is_human_readable() {
deserializer.deserialize_seq(visitor)
deserializer.deserialize_seq(VarZeroVecHumanVisitor::<T, F>::default())
} else {
deserializer.deserialize_bytes(visitor)
deserializer.deserialize_bytes(VarZeroVecVisitor::<T, F>::default())
}

@@ -90,2 +119,18 @@ }

/// This impl requires enabling the optional `serde` Cargo feature of the `zerovec` crate
#[cfg(not(feature = "alloc"))]
impl<'de, 'a, T, F> Deserialize<'de> for VarZeroVec<'a, T, F>
where
T: VarULE + ?Sized,
F: VarZeroVecFormat,
'de: 'a,
{
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
D: Deserializer<'de>,
{
deserializer.deserialize_bytes(VarZeroVecVisitor::<T, F>::default())
}
}
/// This impl requires enabling the optional `serde` Cargo feature of the `zerovec` crate
impl<'de, 'a, T, F> Deserialize<'de> for &'a VarZeroSlice<T, F>

@@ -113,2 +158,3 @@ where

/// This impl requires enabling the optional `serde` Cargo feature of the `zerovec` crate
#[cfg(feature = "alloc")]
impl<'de, T, F> Deserialize<'de> for Box<VarZeroSlice<T, F>>

@@ -173,2 +219,6 @@ where

#[derive(serde::Serialize, serde::Deserialize)]
#[allow(
dead_code,
reason = "Tests compatibility of custom impl with Serde derive."
)]
struct DeriveTest_VarZeroVec<'data> {

@@ -180,2 +230,6 @@ #[serde(borrow)]

#[derive(serde::Serialize, serde::Deserialize)]
#[allow(
dead_code,
reason = "Tests compatibility of custom impl with Serde derive."
)]
struct DeriveTest_VarZeroSlice<'data> {

@@ -187,2 +241,6 @@ #[serde(borrow)]

#[derive(serde::Serialize, serde::Deserialize)]
#[allow(
dead_code,
reason = "Tests compatibility of custom impl with Serde derive."
)]
struct DeriveTest_VarZeroVec_of_VarZeroSlice<'data> {

@@ -189,0 +247,0 @@ #[serde(borrow)]

@@ -232,2 +232,4 @@ // This file is part of ICU4X. For terms of use, please see the file

/// Obtain an owned `Vec<Box<T>>` out of this
///
/// ✨ *Enabled with the `alloc` Cargo feature.*
#[cfg(feature = "alloc")]

@@ -234,0 +236,0 @@ pub fn to_vec(&self) -> alloc::vec::Vec<alloc::boxed::Box<T>> {

@@ -262,2 +262,3 @@ // This file is part of ICU4X. For terms of use, please see the file

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///

@@ -299,2 +300,4 @@ /// # Example

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Example

@@ -337,2 +340,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Example

@@ -353,3 +358,2 @@ ///

match self.0 {
#[cfg(feature = "alloc")]
VarZeroVecInner::Owned(vec) => vec.into_bytes(),

@@ -356,0 +360,0 @@ VarZeroVecInner::Borrowed(vec) => vec.as_bytes().to_vec(),

@@ -170,4 +170,8 @@ // This file is part of ICU4X. For terms of use, please see the file

fn truncate(&mut self, max: usize) {
// SAFETY: The elements in buf are `ULE`, so they don't need to be dropped
// even if we own them.
// SAFETY:
// - The elements in buf are `ULE`, so they don't need to be dropped even if we own them.
// - self.buf is a valid, nonnull slice pointer, since it comes from a NonNull and the struct
// invariant requires validity.
// - Because of the `min`, we are guaranteed to be constructing a slice of the same length or
// smaller, from the same pointer, so it will be valid as well, and similarly non-null.
self.buf = unsafe {

@@ -334,2 +338,4 @@ NonNull::new_unchecked(core::ptr::slice_from_raw_parts_mut(

/// [`Self::alloc_from_slice()`].
///
/// ✨ *Enabled with the `alloc` Cargo feature.*
#[inline]

@@ -358,2 +364,4 @@ #[cfg(feature = "alloc")]

/// backing buffer
///
/// ✨ *Enabled with the `alloc` Cargo feature.*
#[inline]

@@ -376,2 +384,4 @@ pub const fn new_borrowed(slice: &'a [T::ULE]) -> Self {

/// Creates a new, owned, empty `ZeroVec<T>`, with a certain capacity pre-allocated.
///
/// ✨ *Enabled with the `alloc` Cargo feature.*
#[cfg(feature = "alloc")]

@@ -428,2 +438,4 @@ pub fn with_capacity(capacity: usize) -> Self {

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Examples

@@ -489,2 +501,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Examples

@@ -519,2 +533,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Panics

@@ -681,2 +697,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Examples

@@ -732,2 +750,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Example

@@ -755,2 +775,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Example

@@ -806,2 +828,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Example

@@ -838,2 +862,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Example

@@ -865,2 +891,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Example

@@ -900,2 +928,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Example

@@ -927,2 +957,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Example

@@ -961,2 +993,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Example

@@ -994,2 +1028,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Examples

@@ -1040,2 +1076,4 @@ ///

///
/// ✨ *Enabled with the `alloc` Cargo feature.*
///
/// # Examples

@@ -1082,2 +1120,4 @@ ///

/// the logical equivalent of this type's internal representation
///
/// ✨ *Enabled with the `alloc` Cargo feature.*
#[inline]

@@ -1084,0 +1124,0 @@ #[cfg(feature = "alloc")]

@@ -7,8 +7,5 @@ // This file is part of ICU4X. For terms of use, please see the file

use crate::ule::*;
use alloc::boxed::Box;
use alloc::vec::Vec;
use core::fmt;
use core::marker::PhantomData;
use core::mem;
use serde::de::{self, Deserialize, Deserializer, SeqAccess, Visitor};
use serde::de::{self, Deserialize, Deserializer, Visitor};
#[cfg(feature = "serde")]

@@ -46,10 +43,11 @@ use serde::ser::{Serialize, SerializeSeq, Serializer};

#[cfg(feature = "alloc")]
fn visit_seq<A>(self, mut seq: A) -> Result<Self::Value, A::Error>
where
A: SeqAccess<'de>,
A: serde::de::SeqAccess<'de>,
{
let mut vec: Vec<T::ULE> = if let Some(capacity) = seq.size_hint() {
Vec::with_capacity(capacity)
let mut vec: alloc::vec::Vec<T::ULE> = if let Some(capacity) = seq.size_hint() {
alloc::vec::Vec::with_capacity(capacity)
} else {
Vec::new()
alloc::vec::Vec::new()
};

@@ -104,3 +102,4 @@ while let Some(value) = seq.next_element::<T>()? {

/// This impl requires enabling the optional `serde` Cargo feature of the `zerovec` crate
impl<'de, T> Deserialize<'de> for Box<ZeroSlice<T>>
#[cfg(feature = "alloc")]
impl<'de, T> Deserialize<'de> for alloc::boxed::Box<ZeroSlice<T>>
where

@@ -114,3 +113,3 @@ T: Deserialize<'de> + AsULE + 'static,

let mut zv = ZeroVec::<T>::deserialize(deserializer)?;
let vec = zv.with_mut(mem::take);
let vec = zv.with_mut(core::mem::take);
Ok(ZeroSlice::from_boxed_slice(vec.into_boxed_slice()))

@@ -168,2 +167,6 @@ }

#[derive(serde::Serialize, serde::Deserialize)]
#[allow(
dead_code,
reason = "Tests compatibility of custom impl with Serde derive."
)]
struct DeriveTest_ZeroVec<'data> {

@@ -170,0 +173,0 @@ #[serde(borrow)]

@@ -89,2 +89,4 @@ // This file is part of ICU4X. For terms of use, please see the file

/// Construct a `Box<ZeroSlice<T>>` from a boxed slice of ULEs
///
/// ✨ *Enabled with the `alloc` Cargo feature.*
#[inline]

@@ -91,0 +93,0 @@ #[cfg(feature = "alloc")]

Sorry, the diff of this file is not supported yet