diff --git a/Cargo.lock b/Cargo.lock index 4ba4f19c1bb1c6e2af10b6eeeb95d1f948536c22..96767e4503a2b23e42695faf021482eb21f81550 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -247,9 +247,9 @@ dependencies = [ [[package]] name = "inotify" -version = "0.10.1" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff335215fb898bf09c45833b657233d8c0b699a616d7dd64d0513080da270ab6" +checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" dependencies = [ "bitflags", "futures-core", @@ -275,9 +275,9 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -323,9 +323,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.18" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" dependencies = [ "serde", ] @@ -778,9 +778,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -788,9 +788,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", @@ -803,9 +803,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -813,9 +813,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", @@ -826,9 +826,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "winapi" diff --git a/Cargo.toml b/Cargo.toml index 606107b97aeca62d6ba982e3fbbca587b108ee11..a59a3228dae06046d7afc4d105272cc5c48a0111 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,5 +17,5 @@ daemonize = "0.x" serde = { version = "1.0.143", features = ["serde_derive"] } toml = "0.5.9" -inotify = "0.10" +inotify = "0.9" log = "0.4" diff --git a/vendor/inotify/.cargo-checksum.json b/vendor/inotify/.cargo-checksum.json index c505a488054b002bad4305f81b82e89c6416352f..ee5d738021850d3433429c051bb7cf899efbc359 100644 --- a/vendor/inotify/.cargo-checksum.json +++ b/vendor/inotify/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"c14db09d81fd982fb8dbd708753af28d8893de81b03a9457da345b8014e743fe","CONTRIBUTING.md":"63ec0b71cb5acafb22a3edbd1232d8886ed531544b241d956ca284e4163a05fc","Cargo.lock":"a605895698ab5bb687b1ba52f9482c42d6fa5efe48d6c1411d2b521161f0e949","Cargo.toml":"18b601bcf09d8b847cd07a5f65da6e3a87118fd81d5d560aa346594a04369841","LICENSE":"7f78b31de4e7a3e2ac8de40e2b409eda313f03637aa62b8416fbde9bdc5ce4c9","README.md":"10ab19ad3218e62ad22d8db257b19f60aa897529a06482b6502c5ef36844690a","examples/stream.rs":"3d81838f02e16ceef93a5529dcd37b90dbe83ea5195f6d373972cc5fd9bba770","examples/watch.rs":"3b437c8f8c3813167d41d11183198bb26a21d15485a6abf1d3fab86faeb35cd6","src/events.rs":"9ee64a1b9f993f06397958af7fcbd198166686d1a76fcaccb71fd64b780d88c2","src/fd_guard.rs":"3d9dd97d24e4da26ebbc2a467007ae663bc662037ec5e674368e3dd914a2d084","src/inotify.rs":"dc2f9aa1880c6babf0df6be25abdcb29d96621fe345b43c0b026c17a90b5e92d","src/lib.rs":"1d5a7684fa167fe6ba6e76e97e01ef2f130b2eadac21e5a65a13cac5e05c2e9a","src/stream.rs":"9485e66347153aa1f943ab3b754e7603e29e978abc8add1c58bd7b33a191621f","src/util.rs":"0384fba107edf17bc29dc6694038be6271774d5fc530b01784dac8ec8a8183f6","src/watches.rs":"18c892af2757626c25b99ff948be392c2e29c8abd0d436898856ec0fd5faa9c8","tests/main.rs":"6d70e9c278823db5c5a293bc973c9fb04de0605966c23be03aaf1d97db8e45e4"},"package":"ff335215fb898bf09c45833b657233d8c0b699a616d7dd64d0513080da270ab6"} \ No newline at end of file +{"files":{"CHANGELOG.md":"d0584f914aebf070e1be3ca96ef065b94f3234b13e7dcceec93249d8943db067","CONTRIBUTING.md":"63ec0b71cb5acafb22a3edbd1232d8886ed531544b241d956ca284e4163a05fc","Cargo.lock":"c7bbe32ee961e85c7695ed83d80408c14c91748710d857c724a807c1b34f29ee","Cargo.toml":"a3c3ebabfa79a6cf46009630a61911e94964d492cc4208366f49cbc365042d8f","LICENSE":"7f78b31de4e7a3e2ac8de40e2b409eda313f03637aa62b8416fbde9bdc5ce4c9","README.md":"1ea282e675f038a96381e6c77d2968e0a3850342f4155f8b6e2262a8f74a74b2","examples/stream.rs":"38732ec68508a8da91e27efb1f042228544b68744cc565a33a63afdb84b76689","examples/watch.rs":"4a7d222e6579b0ecaf9a9713f469a0d81bacbf294bdc88af657dfd1fd24cee21","src/events.rs":"c3e7e203aa6bf1cfab0865e629f69092e2dcfae97cd2c0ac76c69c04dcf006f5","src/fd_guard.rs":"40ce706cd2eecae278680512796c4b2890c6bd23c565d0ae06adca47ca1589a7","src/inotify.rs":"8843d08098d8ed85513c625be07dcadaf4de27eb7aaf2dec930d2d22efaa0c93","src/lib.rs":"3aca05bbd217d18a6f3b995e9d6e112b5e6dad5327f32058f60cc26f62005aea","src/stream.rs":"6bca1ae58003b3e5643bef13b0b1eb214c9027d9935ac7aacce0861cd24314d1","src/util.rs":"17d21c40a447181f5fb10646cb3e9bc996f93c6f50167db9a8e14086e9ea904d","src/watches.rs":"07e1a61eacb2dade17bc3de09d82f0cc453b7a36062b865916634145278ddb3f","tests/main.rs":"7914fb0d6a5e0991d47b77132744a90b5aa1bf20174df14da9c6395d1340b1e1"},"package":"f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff"} \ No newline at end of file diff --git a/vendor/inotify/CHANGELOG.md b/vendor/inotify/CHANGELOG.md index 6e5b0998b000b3a7f9c37fc87ca8b18d455384b7..a5b4dafcdd96dd31ca5c98239d8b26e1c0f6c753 100644 --- a/vendor/inotify/CHANGELOG.md +++ b/vendor/inotify/CHANGELOG.md @@ -1,32 +1,4 @@ -# Changelog - -## v0.10.1 (2023-06-07) - -- Add `WatchDescriptor::get_watch_descriptor_id` ([#193]) -- Add `Event::to_owned` ([#196]) -- Deprecate `Event::into_owned` ([#196]) -- Add `Watches`/`Inotify::watches`/`EventStream::watches` ([#197]) -- Deprecate `Inotify::add_watch`/`Inotify::rm_watch` ([#197]) -- Add `Inotify::into_event_stream`/`EventStream::into_inotify` ([#199]) -- Deprecate `Inotify::event_stream` ([#199]) -- Implement `AsFd` and bidirectional conversion to/from `OwnedFd` ([#202]) -- Raise Minimum Supported Rust Version (MSRV) to 1.63.0 ([#202]) - -[#193]: https://github.com/hannobraun/inotify-rs/pull/193 -[#196]: https://github.com/hannobraun/inotify-rs/pull/196 -[#197]: https://github.com/hannobraun/inotify-rs/pull/197 -[#199]: https://github.com/hannobraun/inotify-rs/pull/199 -[#202]: https://github.com/hannobraun/inotify-rs/pull/202 - - -## v0.10.0 (2021-12-07) - -- **Breaking change:** Remove special handling of `WouldBlock` error ([#190]) - -[#190]: https://github.com/hannobraun/inotify-rs/pull/190 - - -## v0.9.6 (2021-11-03) +### v0.9.6 (2021-10-07) - Fix build status badge in README ([#185]) - Add `get_buffer_size`/`get_absolute_path_buffer_size` ([#187]) @@ -35,14 +7,14 @@ [#187]: https://github.com/hannobraun/inotify-rs/pull/187 -## v0.9.5 (2021-10-07) +### v0.9.5 (2021-10-07) - Implement `Ord`/`PartialOrd` for `WatchDescriptor` ([#183]) [#183]: https://github.com/hannobraun/inotify-rs/pull/183 -## v0.9.4 (2021-09-22) +### v0.9.4 (2021-09-22) - Make `Event::into_owned` always available ([#179]) - Implement missing `Debug` implementations ([#180]) @@ -51,7 +23,7 @@ [#180]: https://github.com/hannobraun/inotify-rs/pull/180 -## v0.9.3 (2021-05-12) +### v0.9.3 (2021-05-12) - Improve documentation ([#167], [#169]) - Add missing check for invalid file descriptor ([#168]) @@ -65,21 +37,23 @@ [#173]: https://github.com/hannobraun/inotify-rs/pull/173 -## v0.9.2 (2020-12-30) +### v0.9.2 (2020-12-30) - Upgrade to Tokio 1.0 ([#165]) [#165]: https://github.com/hannobraun/inotify/pull/165 -## v0.9.1 (2020-11-09) + +### v0.9.1 (2020-11-09) - Fix take wake-up ([#161]) [#161]: https://github.com/hannobraun/inotify/pull/161 -## v0.9.0 (2020-11-06) + +### v0.9.0 (2020-11-06) - Update minimum supported Rust version to version 1.47 ([#154]) - Fix documentation: `Inotify::read_events` doesn't handle all events ([#157]) @@ -90,55 +64,78 @@ [#158]: https://github.com/hannobraun/inotify/pull/158 -## v0.8.3 (2020-06-05) + +### v0.8.3 (2020-06-05) - Avoid using `inotify_init1` ([#146]) [#146]: https://github.com/hannobraun/inotify/pull/146 -## v0.8.2 (2020-01-25) + +### v0.8.2 (2020-01-25) - Ensure file descriptor is closed on drop ([#140]) [#140]: https://github.com/inotify-rs/inotify/pull/140 -## v0.8.1 (2020-01-23) + +### v0.8.1 (2020-01-23) No changes, due to a mistake made while releasing this version. -## v0.8.0 (2019-12-04) + +### v0.8.0 (2019-12-04) - Update to tokio 0.2 and futures 0.3 ([#134]) [#134]: https://github.com/inotify-rs/inotify/pull/134 -## v0.7.1 (2020-06-05) + +### v0.7.1 (2020-06-05) - backport: Avoid using `inotify_init1` ([#146]) [#146]: https://github.com/hannobraun/inotify/pull/146 -## v0.7.0 (2019-02-09) + +### v0.7.0 (2019-02-09) + +#### Features -- Make stream API more flexible in regards to buffers ([ea3e7a394bf34a6ccce4f2136c0991fe7e8f1f42](ea3e7a394bf34a6ccce4f2136c0991fe7e8f1f42)) (breaking change) +* Make stream API more flexible in regards to buffers ([ea3e7a394bf34a6ccce4f2136c0991fe7e8f1f42](ea3e7a394bf34a6ccce4f2136c0991fe7e8f1f42)) (breaking change) + +### v0.6.1 (2018-08-28) -## v0.6.1 (2018-08-28) -- Don't return spurious filenames ([2f37560f](2f37560f)) +#### Bug Fixes +* Don't return spurious filenames ([2f37560f](2f37560f)) + + + ## v0.6.0 (2018-08-16) -- Handle closing of inotify instance better ([824160fe](824160fe)) -- Implement `EventStream` using `mio` ([ba4cb8c7](ba4cb8c7)) + +#### Features + +* Handle closing of inotify instance better ([824160fe](824160fe)) +* Implement `EventStream` using `mio` ([ba4cb8c7](ba4cb8c7)) + + + + +### v0.5.1 (2018-02-27) + +#### Features + +* Add future-based async API ([569e65a7](569e65a7), closes [#49](49)) -## v0.5.1 (2018-02-27) -- Add future-based async API ([569e65a7](569e65a7), closes [#49](49)) diff --git a/vendor/inotify/Cargo.lock b/vendor/inotify/Cargo.lock index e7bc4aad8b8a18e53f3b5984408120b159d330c5..dcb9ebe423019af29f7d999dda5c8dffc940dea5 100644 --- a/vendor/inotify/Cargo.lock +++ b/vendor/inotify/Cargo.lock @@ -4,21 +4,15 @@ version = 3 [[package]] name = "autocfg" -version = "1.1.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cc" -version = "1.0.79" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "cfg-if" @@ -26,48 +20,20 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121" dependencies = [ + "autocfg", + "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -75,29 +41,32 @@ dependencies = [ [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967" dependencies = [ + "autocfg", "futures-core", "futures-macro", "futures-task", "pin-project-lite", "pin-utils", + "proc-macro-hack", + "proc-macro-nested", "slab", ] [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ "cfg-if", "libc", @@ -106,30 +75,22 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" - [[package]] name = "inotify" -version = "0.10.1" +version = "0.9.6" dependencies = [ "bitflags", "futures-core", "futures-util", "inotify-sys", "libc", - "maplit", - "rand", "tempfile", "tokio", ] @@ -144,69 +105,66 @@ dependencies = [ ] [[package]] -name = "instant" -version = "0.1.12" +name = "libc" +version = "0.2.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" + +[[package]] +name = "log" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ "cfg-if", ] [[package]] -name = "io-lifetimes" -version = "1.0.11" +name = "mio" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956" dependencies = [ - "hermit-abi 0.3.1", "libc", - "windows-sys", + "log", + "miow", + "ntapi", + "winapi", ] [[package]] -name = "libc" -version = "0.2.146" +name = "miow" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +dependencies = [ + "winapi", +] [[package]] -name = "mio" -version = "0.8.8" +name = "ntapi" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" dependencies = [ - "libc", - "wasi", - "windows-sys", + "winapi", ] [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi", "libc", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" [[package]] name = "pin-utils" @@ -216,44 +174,57 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + +[[package]] +name = "proc-macro-hack" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" + +[[package]] +name = "proc-macro-nested" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" dependencies = [ - "unicode-ident", + "unicode-xid", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ "proc-macro2", ] [[package]] name = "rand" -version = "0.8.5" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" dependencies = [ "libc", "rand_chacha", "rand_core", + "rand_hc", ] [[package]] name = "rand_chacha" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" dependencies = [ "ppv-lite86", "rand_core", @@ -261,101 +232,90 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.4" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" dependencies = [ "getrandom", ] [[package]] -name = "redox_syscall" -version = "0.3.5" +name = "rand_hc" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" dependencies = [ - "bitflags", + "rand_core", ] [[package]] -name = "rustix" -version = "0.37.19" +name = "redox_syscall" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc" dependencies = [ "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys", ] [[package]] -name = "slab" -version = "0.4.8" +name = "remove_dir_all" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "autocfg", + "winapi", ] [[package]] -name = "socket2" -version = "0.4.9" +name = "slab" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] +checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" [[package]] name = "syn" -version = "2.0.18" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" dependencies = [ "proc-macro2", "quote", - "unicode-ident", + "unicode-xid", ] [[package]] name = "tempfile" -version = "3.6.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "autocfg", "cfg-if", - "fastrand", + "libc", + "rand", "redox_syscall", - "rustix", - "windows-sys", + "remove_dir_all", + "winapi", ] [[package]] name = "tokio" -version = "1.28.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "83f0c8e7c0addab50b663055baf787d0af7f413a46e6e7fb9559a4e4db7137a5" dependencies = [ "autocfg", "libc", "mio", "num_cpus", "pin-project-lite", - "socket2", "tokio-macros", - "windows-sys", ] [[package]] name = "tokio-macros" -version = "2.1.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57" dependencies = [ "proc-macro2", "quote", @@ -363,16 +323,16 @@ dependencies = [ ] [[package]] -name = "unicode-ident" -version = "1.0.9" +name = "unicode-xid" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "winapi" @@ -395,69 +355,3 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" diff --git a/vendor/inotify/Cargo.toml b/vendor/inotify/Cargo.toml index 320595f13cba6bfc377806cfd76b45f7c3cb2204..3d4f199360d61d17353a465e0ab3e0477ce4978b 100644 --- a/vendor/inotify/Cargo.toml +++ b/vendor/inotify/Cargo.toml @@ -11,30 +11,15 @@ [package] edition = "2018" -rust-version = "1.63" name = "inotify" -version = "0.10.1" -authors = [ - "Hanno Braun ", - "Félix Saparelli ", - "Cristian Kubis ", - "Frank Denis ", -] -exclude = [ - "/.travis.yml", - "/inotify-rs.sublime-project", -] +version = "0.9.6" +authors = ["Hanno Braun ", "Félix Saparelli ", "Cristian Kubis ", "Frank Denis "] +exclude = ["/.travis.yml", "/inotify-rs.sublime-project"] description = "Idiomatic wrapper for inotify" documentation = "https://docs.rs/inotify" readme = "README.md" -keywords = [ - "inotify", - "linux", -] -categories = [ - "api-bindings", - "filesystem", -] +keywords = ["inotify", "linux"] +categories = ["api-bindings", "filesystem"] license = "ISC" repository = "https://github.com/hannobraun/inotify" @@ -44,7 +29,6 @@ required-features = ["stream"] [[example]] name = "watch" - [dependencies.bitflags] version = "1" @@ -62,33 +46,19 @@ version = "0.2" version = "1.0.1" features = ["net"] optional = true - [dev-dependencies.futures-util] version = "0.3.1" -[dev-dependencies.maplit] -version = "1.0" - -[dev-dependencies.rand] -version = "0.8" - [dev-dependencies.tempfile] version = "3.1.0" [dev-dependencies.tokio] version = "1.0.1" -features = [ - "macros", - "rt-multi-thread", -] +features = ["macros", "rt-multi-thread"] [features] default = ["stream"] -stream = [ - "futures-core", - "tokio", -] - +stream = ["futures-core", "tokio"] [badges.maintenance] status = "actively-developed" diff --git a/vendor/inotify/README.md b/vendor/inotify/README.md index f3d27f41bf5667e7212223152e21174057eaf269..ba91cdce9e638151bfdfda3d24930e5aecf18453 100644 --- a/vendor/inotify/README.md +++ b/vendor/inotify/README.md @@ -23,8 +23,7 @@ fn main() { .expect("Failed to determine current directory"); inotify - .watches() - .add( + .add_watch( current_dir, WatchMask::MODIFY | WatchMask::CREATE | WatchMask::DELETE, ) @@ -70,7 +69,7 @@ Include it in your `Cargo.toml`: ```toml [dependencies] -inotify = "0.10" +inotify = "0.9" ``` Please refer to the [documentation] and the example above, for information on how to use it in your code. diff --git a/vendor/inotify/examples/stream.rs b/vendor/inotify/examples/stream.rs index ca2282f56874f5f7d42d0672ef26ee9278b67dc2..f2e6b88f9899f160a2ce3c5d2a7d112abc687ec6 100644 --- a/vendor/inotify/examples/stream.rs +++ b/vendor/inotify/examples/stream.rs @@ -14,12 +14,12 @@ use tempfile::TempDir; #[tokio::main] async fn main() -> Result<(), io::Error> { - let inotify = Inotify::init() + let mut inotify = Inotify::init() .expect("Failed to initialize inotify"); let dir = TempDir::new()?; - inotify.watches().add(dir.path(), WatchMask::CREATE | WatchMask::MODIFY)?; + inotify.add_watch(dir.path(), WatchMask::CREATE | WatchMask::MODIFY)?; thread::spawn::<_, Result<(), io::Error>>(move || { loop { @@ -29,7 +29,7 @@ async fn main() -> Result<(), io::Error> { }); let mut buffer = [0; 1024]; - let mut stream = inotify.into_event_stream(&mut buffer)?; + let mut stream = inotify.event_stream(&mut buffer)?; while let Some(event_or_error) = stream.next().await { println!("event: {:?}", event_or_error?); diff --git a/vendor/inotify/examples/watch.rs b/vendor/inotify/examples/watch.rs index 8bdeb7b5dbf6f369c43308ec4f68ae92b5fca333..c86ff17ca90f0396a7c151d84e14b58d4a01b75f 100644 --- a/vendor/inotify/examples/watch.rs +++ b/vendor/inotify/examples/watch.rs @@ -15,8 +15,7 @@ fn main() { .expect("Failed to determine current directory"); inotify - .watches() - .add( + .add_watch( current_dir, WatchMask::MODIFY | WatchMask::CREATE | WatchMask::DELETE, ) diff --git a/vendor/inotify/src/events.rs b/vendor/inotify/src/events.rs index 1cd508c30f9d3a8223b0c3b0a0f2bbc4945669bc..2c5e010bfcead22499f6ddb5fb694d8f4d7fd518 100644 --- a/vendor/inotify/src/events.rs +++ b/vendor/inotify/src/events.rs @@ -12,6 +12,7 @@ use inotify_sys as ffi; use crate::fd_guard::FdGuard; use crate::watches::WatchDescriptor; +use crate::util::align_buffer; /// Iterator over inotify events @@ -34,10 +35,10 @@ impl<'a> Events<'a> { -> Self { Events { - fd, - buffer, - num_bytes, - pos: 0, + fd : fd, + buffer : buffer, + num_bytes: num_bytes, + pos : 0, } } } @@ -62,26 +63,26 @@ impl<'a> Iterator for Events<'a> { /// An inotify event /// /// A file system event that describes a change that the user previously -/// registered interest in. To watch for events, call [`Watches::add`]. To +/// registered interest in. To watch for events, call [`Inotify::add_watch`]. To /// retrieve events, call [`Inotify::read_events_blocking`] or /// [`Inotify::read_events`]. /// -/// [`Watches::add`]: struct.Watches.html#method.add +/// [`Inotify::add_watch`]: struct.Inotify.html#method.add_watch /// [`Inotify::read_events_blocking`]: struct.Inotify.html#method.read_events_blocking /// [`Inotify::read_events`]: struct.Inotify.html#method.read_events #[derive(Clone, Debug)] pub struct Event { /// Identifies the watch this event originates from /// - /// This [`WatchDescriptor`] is equal to the one that [`Watches::add`] + /// This [`WatchDescriptor`] is equal to the one that [`Inotify::add_watch`] /// returned when interest for this event was registered. The /// [`WatchDescriptor`] can be used to remove the watch using - /// [`Watches::remove`], thereby preventing future events of this type + /// [`Inotify::rm_watch`], thereby preventing future events of this type /// from being created. /// /// [`WatchDescriptor`]: struct.WatchDescriptor.html - /// [`Watches::add`]: struct.Watches.html#method.add - /// [`Watches::remove`]: struct.Watches.html#method.remove + /// [`Inotify::add_watch`]: struct.Inotify.html#method.add_watch + /// [`Inotify::rm_watch`]: struct.Inotify.html#method.rm_watch pub wd: WatchDescriptor, /// Indicates what kind of event this is @@ -117,7 +118,7 @@ impl<'a> Event<&'a OsStr> { fd, }; - let name = if name.is_empty() { + let name = if name == "" { None } else { @@ -149,32 +150,37 @@ impl<'a> Event<&'a OsStr> { -> (usize, Self) { let event_size = mem::size_of::(); + let event_align = mem::align_of::(); + + // Make sure that the buffer can satisfy the alignment requirements for `inotify_event` + assert!(buffer.len() >= event_align); + + // Discard the unaligned portion, if any, of the supplied buffer + let buffer = align_buffer(buffer); - // Make sure that the buffer is big enough to contain an event, without + // Make sure that the aligned buffer is big enough to contain an event, without // the name. Otherwise we can't safely convert it to an `inotify_event`. assert!(buffer.len() >= event_size); - let ffi_event_ptr = buffer.as_ptr() as *const ffi::inotify_event; + + let event = buffer.as_ptr() as *const ffi::inotify_event; // We have a pointer to an `inotify_event`, pointing to the beginning of // `buffer`. Since we know, as per the assertion above, that there are // enough bytes in the buffer for at least one event, we can safely - // read that `inotify_event`. - // We call `read_unaligned()` since the byte buffer has alignment 1 - // and `inotify_event` has a higher alignment, so `*` cannot be used to dereference - // the unaligned pointer (undefined behavior). - let ffi_event = unsafe { ffi_event_ptr.read_unaligned() }; + // convert that pointer into a reference. + let event = unsafe { &*event }; // The name's length is given by `event.len`. There should always be // enough bytes left in the buffer to fit the name. Let's make sure that // is the case. let bytes_left_in_buffer = buffer.len() - event_size; - assert!(bytes_left_in_buffer >= ffi_event.len as usize); + assert!(bytes_left_in_buffer >= event.len as usize); // Directly after the event struct should be a name, if there's one // associated with the event. Let's make a new slice that starts with // that name. If there's no name, this slice might have a length of `0`. - let bytes_consumed = event_size + ffi_event.len as usize; + let bytes_consumed = event_size + event.len as usize; let name = &buffer[event_size..bytes_consumed]; // Remove trailing '\0' bytes @@ -192,23 +198,16 @@ impl<'a> Event<&'a OsStr> { let event = Event::new( fd, - &ffi_event, + event, OsStr::from_bytes(name), ); (bytes_consumed, event) } - /// Returns an owned copy of the event. - #[deprecated = "use `to_owned()` instead; methods named `into_owned()` usually take self by value"] - #[allow(clippy::wrong_self_convention)] - pub fn into_owned(&self) -> EventOwned { - self.to_owned() - } - /// Returns an owned copy of the event. #[must_use = "cloning is often expensive and is not expected to have side effects"] - pub fn to_owned(&self) -> EventOwned { + pub fn into_owned(&self) -> EventOwned { Event { wd: self.wd.clone(), mask: self.mask, @@ -351,7 +350,7 @@ bitflags! { /// Watch was removed /// /// This event will be generated, if the watch was removed explicitly - /// (via [`Watches::remove`]), or automatically (because the file was + /// (via [`Inotify::rm_watch`]), or automatically (because the file was /// deleted or the file system was unmounted). /// /// See [`inotify_sys::IN_IGNORED`]. @@ -402,6 +401,8 @@ mod tests { sync, }; + use crate::util; + use inotify_sys as ffi; use super::Event; @@ -411,6 +412,9 @@ mod tests { fn from_buffer_should_not_mistake_next_event_for_name_of_previous_event() { let mut buffer = [0u8; 1024]; + // Make sure the buffer is properly aligned before writing raw events into it + let buffer = util::align_buffer_mut(&mut buffer); + // First, put a normal event into the buffer let event = ffi::inotify_event { wd: 0, diff --git a/vendor/inotify/src/fd_guard.rs b/vendor/inotify/src/fd_guard.rs index dfadfcd8f831648da0a7f1fc1fce929ded1d8a9a..cd16078da23f8fcdcb9754d315571ad5d2c10807 100644 --- a/vendor/inotify/src/fd_guard.rs +++ b/vendor/inotify/src/fd_guard.rs @@ -1,9 +1,7 @@ use std::{ ops::Deref, os::unix::io::{ - AsFd, AsRawFd, - BorrowedFd, FromRawFd, IntoRawFd, RawFd, @@ -79,13 +77,6 @@ impl AsRawFd for FdGuard { } } -impl AsFd for FdGuard { - #[inline] - fn as_fd(&self) -> BorrowedFd<'_> { - unsafe { BorrowedFd::borrow_raw(self.fd) } - } -} - impl PartialEq for FdGuard { fn eq(&self, other: &FdGuard) -> bool { self.fd == other.fd diff --git a/vendor/inotify/src/inotify.rs b/vendor/inotify/src/inotify.rs index acfd9587074c25b7bc129a310b22028cd029cc46..10099eed42e0e65edfe363269a5045337e14cb98 100644 --- a/vendor/inotify/src/inotify.rs +++ b/vendor/inotify/src/inotify.rs @@ -1,12 +1,11 @@ use std::{ + ffi::CString, io, + os::unix::ffi::OsStrExt, os::unix::io::{ - AsFd, AsRawFd, - BorrowedFd, FromRawFd, IntoRawFd, - OwnedFd, RawFd, }, path::Path, @@ -19,7 +18,9 @@ use std::{ use inotify_sys as ffi; use libc::{ F_GETFL, + F_SETFD, F_SETFL, + FD_CLOEXEC, O_NONBLOCK, fcntl, }; @@ -30,7 +31,6 @@ use crate::util::read_into_buffer; use crate::watches::{ WatchDescriptor, WatchMask, - Watches, }; @@ -85,29 +85,34 @@ impl Inotify { /// [`IN_CLOEXEC`]: ../inotify_sys/constant.IN_CLOEXEC.html /// [`IN_NONBLOCK`]: ../inotify_sys/constant.IN_NONBLOCK.html pub fn init() -> io::Result { + // Initialize inotify and set CLOEXEC and NONBLOCK flags. + // + // NONBLOCK is needed, because `Inotify` manages blocking behavior for + // the API consumer, and the way we do that is to make everything non- + // blocking by default and later override that as required. + // + // CLOEXEC prevents leaking file descriptors to processes executed by + // this process and seems to be a best practice. I don't grasp this + // issue completely and failed to find any authoritative sources on the + // topic. There's some discussion in the open(2) and fcntl(2) man pages, + // but I didn't find that helpful in understanding the issue of leaked + // file descriptors. For what it's worth, there's a Rust issue about + // this: + // https://github.com/rust-lang/rust/issues/12148 let fd = unsafe { - // Initialize inotify and pass both `IN_CLOEXEC` and `IN_NONBLOCK`. - // - // `IN_NONBLOCK` is needed, because `Inotify` manages blocking - // behavior for the API consumer, and the way we do that is to make - // everything non-blocking by default and later override that as - // required. - // - // Passing `IN_CLOEXEC` prevents leaking file descriptors to - // processes executed by this process and seems to be a best - // practice. I don't grasp this issue completely and failed to find - // any authoritative sources on the topic. There's some discussion in - // the open(2) and fcntl(2) man pages, but I didn't find that - // helpful in understanding the issue of leaked file descriptors. - // For what it's worth, there's a Rust issue about this: - // https://github.com/rust-lang/rust/issues/12148 - ffi::inotify_init1(ffi::IN_CLOEXEC | ffi::IN_NONBLOCK) + let fd = ffi::inotify_init(); + if fd == -1 { + return Err(io::Error::last_os_error()); + } + if fcntl(fd, F_SETFD, FD_CLOEXEC) == -1 { + return Err(io::Error::last_os_error()); + } + if fcntl(fd, F_SETFL, O_NONBLOCK) == -1 { + return Err(io::Error::last_os_error()); + } + fd }; - if fd == -1 { - return Err(io::Error::last_os_error()); - } - Ok(Inotify { fd: Arc::new(FdGuard { fd, @@ -116,28 +121,157 @@ impl Inotify { }) } - /// Gets an interface that allows adding and removing watches. - /// See [`Watches::add`] and [`Watches::remove`]. + /// Adds or updates a watch for the given path /// - /// [`Watches::add`]: struct.Watches.html#method.add - /// [`Watches::remove`]: struct.Watches.html#method.remove - pub fn watches(&self) -> Watches { - Watches::new(self.fd.clone()) - } - - /// Deprecated: use `Inotify.watches().add()` instead - #[deprecated = "use `Inotify.watches().add()` instead"] + /// Adds a new watch or updates an existing one for the file referred to by + /// `path`. Returns a watch descriptor that can be used to refer to this + /// watch later. + /// + /// The `mask` argument defines what kind of changes the file should be + /// watched for, and how to do that. See the documentation of [`WatchMask`] + /// for details. + /// + /// If this method is used to add a new watch, a new [`WatchDescriptor`] is + /// returned. If it is used to update an existing watch, a + /// [`WatchDescriptor`] that equals the previously returned + /// [`WatchDescriptor`] for that watch is returned instead. + /// + /// Under the hood, this method just calls [`inotify_add_watch`] and does + /// some trivial translation between the types on the Rust side and the C + /// side. + /// + /// # Attention: Updating watches and hardlinks + /// + /// As mentioned above, this method can be used to update an existing watch. + /// This is usually done by calling this method with the same `path` + /// argument that it has been called with before. But less obviously, it can + /// also happen if the method is called with a different path that happens + /// to link to the same inode. + /// + /// You can detect this by keeping track of [`WatchDescriptor`]s and the + /// paths they have been returned for. If the same [`WatchDescriptor`] is + /// returned for a different path (and you haven't freed the + /// [`WatchDescriptor`] by removing the watch), you know you have two paths + /// pointing to the same inode, being watched by the same watch. + /// + /// # Errors + /// + /// Directly returns the error from the call to + /// [`inotify_add_watch`][`inotify_add_watch`] (translated into an + /// `io::Error`), without adding any error conditions of + /// its own. + /// + /// # Examples + /// + /// ``` + /// use inotify::{ + /// Inotify, + /// WatchMask, + /// }; + /// + /// let mut inotify = Inotify::init() + /// .expect("Failed to initialize an inotify instance"); + /// + /// # // Create a temporary file, so `add_watch` won't return an error. + /// # use std::fs::File; + /// # File::create("/tmp/inotify-rs-test-file") + /// # .expect("Failed to create test file"); + /// # + /// inotify.add_watch("/tmp/inotify-rs-test-file", WatchMask::MODIFY) + /// .expect("Failed to add file watch"); + /// + /// // Handle events for the file here + /// ``` + /// + /// [`inotify_add_watch`]: ../inotify_sys/fn.inotify_add_watch.html + /// [`WatchMask`]: struct.WatchMask.html + /// [`WatchDescriptor`]: struct.WatchDescriptor.html pub fn add_watch

(&mut self, path: P, mask: WatchMask) -> io::Result where P: AsRef { - self.watches().add(path, mask) + let path = CString::new(path.as_ref().as_os_str().as_bytes())?; + + let wd = unsafe { + ffi::inotify_add_watch( + **self.fd, + path.as_ptr() as *const _, + mask.bits(), + ) + }; + + match wd { + -1 => Err(io::Error::last_os_error()), + _ => Ok(WatchDescriptor{ id: wd, fd: Arc::downgrade(&self.fd) }), + } } - /// Deprecated: use `Inotify.watches().remove()` instead - #[deprecated = "use `Inotify.watches().remove()` instead"] + /// Stops watching a file + /// + /// Removes the watch represented by the provided [`WatchDescriptor`] by + /// calling [`inotify_rm_watch`]. [`WatchDescriptor`]s can be obtained via + /// [`Inotify::add_watch`], or from the `wd` field of [`Event`]. + /// + /// # Errors + /// + /// Directly returns the error from the call to [`inotify_rm_watch`]. + /// Returns an [`io::Error`] with [`ErrorKind`]`::InvalidInput`, if the given + /// [`WatchDescriptor`] did not originate from this [`Inotify`] instance. + /// + /// # Examples + /// + /// ``` + /// use inotify::Inotify; + /// + /// let mut inotify = Inotify::init() + /// .expect("Failed to initialize an inotify instance"); + /// + /// # // Create a temporary file, so `add_watch` won't return an error. + /// # use std::fs::File; + /// # let mut test_file = File::create("/tmp/inotify-rs-test-file") + /// # .expect("Failed to create test file"); + /// # + /// # // Add a watch and modify the file, so the code below doesn't block + /// # // forever. + /// # use inotify::WatchMask; + /// # inotify.add_watch("/tmp/inotify-rs-test-file", WatchMask::MODIFY) + /// # .expect("Failed to add file watch"); + /// # use std::io::Write; + /// # write!(&mut test_file, "something\n") + /// # .expect("Failed to write something to test file"); + /// # + /// let mut buffer = [0; 1024]; + /// let events = inotify + /// .read_events_blocking(&mut buffer) + /// .expect("Error while waiting for events"); + /// + /// for event in events { + /// inotify.rm_watch(event.wd); + /// } + /// ``` + /// + /// [`WatchDescriptor`]: struct.WatchDescriptor.html + /// [`inotify_rm_watch`]: ../inotify_sys/fn.inotify_rm_watch.html + /// [`Inotify::add_watch`]: struct.Inotify.html#method.add_watch + /// [`Event`]: struct.Event.html + /// [`Inotify`]: struct.Inotify.html + /// [`io::Error`]: https://doc.rust-lang.org/std/io/struct.Error.html + /// [`ErrorKind`]: https://doc.rust-lang.org/std/io/enum.ErrorKind.html pub fn rm_watch(&mut self, wd: WatchDescriptor) -> io::Result<()> { - self.watches().remove(wd) + if wd.fd.upgrade().as_ref() != Some(&self.fd) { + return Err(io::Error::new( + io::ErrorKind::InvalidInput, + "Invalid WatchDescriptor", + )); + } + + let result = unsafe { ffi::inotify_rm_watch(**self.fd, wd.id) }; + match result { + 0 => Ok(()), + -1 => Err(io::Error::last_os_error()), + _ => panic!( + "unexpected return code from inotify_rm_watch ({})", result) + } } /// Waits until events are available, then returns them @@ -193,8 +327,9 @@ impl Inotify { /// /// # Errors /// - /// This function directly returns all errors from the call to [`read`]. - /// In addition, [`ErrorKind::UnexpectedEof`] is returned, if the call to + /// This function directly returns all errors from the call to [`read`] + /// (except EGAIN/EWOULDBLOCK, which result in an empty iterator). In + /// addition, [`ErrorKind::UnexpectedEof`] is returned, if the call to /// [`read`] returns `0`, signaling end-of-file. /// /// If `buffer` is too small, this will result in an error with @@ -203,21 +338,15 @@ impl Inotify { /// /// # Examples /// - /// ```no_run + /// ``` /// use inotify::Inotify; - /// use std::io::ErrorKind; /// /// let mut inotify = Inotify::init() /// .expect("Failed to initialize an inotify instance"); /// /// let mut buffer = [0; 1024]; - /// let events = loop { - /// match inotify.read_events(&mut buffer) { - /// Ok(events) => break events, - /// Err(error) if error.kind() == ErrorKind::WouldBlock => continue, - /// _ => panic!("Error while reading events"), - /// } - /// }; + /// let events = inotify.read_events(&mut buffer) + /// .expect("Error while reading events"); /// /// for event in events { /// // Handle event @@ -244,7 +373,12 @@ impl Inotify { } -1 => { let error = io::Error::last_os_error(); - return Err(error); + if error.kind() == io::ErrorKind::WouldBlock { + return Ok(Events::new(Arc::downgrade(&self.fd), buffer, 0)); + } + else { + return Err(error); + } }, _ if num_bytes < 0 => { panic!("{} {} {} {} {} {}", @@ -273,43 +407,19 @@ impl Inotify { Ok(Events::new(Arc::downgrade(&self.fd), buffer, num_bytes)) } - /// Deprecated: use `into_event_stream()` instead, which enforces a single `Stream` and predictable reads. - /// Using this method to create multiple `EventStream` instances from one `Inotify` is unsupported, - /// as they will contend over one event source and each produce unpredictable stream contents. - #[deprecated = "use `into_event_stream()` instead, which enforces a single Stream and predictable reads"] - #[cfg(feature = "stream")] - pub fn event_stream(&mut self, buffer: T) - -> io::Result> - where - T: AsMut<[u8]> + AsRef<[u8]>, - { - EventStream::new(self.fd.clone(), buffer) - } - - /// Create a stream which collects events. Consumes the `Inotify` instance. + /// Create a stream which collects events /// /// Returns a `Stream` over all events that are available. This stream is an /// infinite source of events. /// /// An internal buffer which can hold the largest possible event is used. #[cfg(feature = "stream")] - pub fn into_event_stream(self, buffer: T) + pub fn event_stream(&mut self, buffer: T) -> io::Result> where T: AsMut<[u8]> + AsRef<[u8]>, { - EventStream::new(self.fd, buffer) - } - - /// Creates an `Inotify` instance using the file descriptor which was originally - /// initialized in `Inotify::init`. This is intended to be used to transform an - /// `EventStream` back into an `Inotify`. Do not attempt to clone `Inotify` with this. - #[cfg(feature = "stream")] - pub(crate) fn from_file_descriptor(fd: Arc) -> Self - { - Inotify { - fd, - } + EventStream::new(self.fd.clone(), buffer) } /// Closes the inotify instance @@ -373,22 +483,3 @@ impl IntoRawFd for Inotify { self.fd.fd } } - -impl AsFd for Inotify { - #[inline] - fn as_fd(&self) -> BorrowedFd<'_> { - self.fd.as_fd() - } -} - -impl From for OwnedFd { - fn from(fd: Inotify) -> OwnedFd { - unsafe { OwnedFd::from_raw_fd(fd.into_raw_fd()) } - } -} - -impl From for Inotify { - fn from(fd: OwnedFd) -> Inotify { - unsafe { Inotify::from_raw_fd(fd.into_raw_fd()) } - } -} diff --git a/vendor/inotify/src/lib.rs b/vendor/inotify/src/lib.rs index b037ae156aacfea2c7846dc6cac23d7f16d44501..7375ee552caca8c4f56ce97e504d5ee12b7bbf69 100644 --- a/vendor/inotify/src/lib.rs +++ b/vendor/inotify/src/lib.rs @@ -19,15 +19,14 @@ //! let mut inotify = Inotify::init() //! .expect("Error while initializing inotify instance"); //! -//! # // Create a temporary file, so `Watches::add` won't return an error. +//! # // Create a temporary file, so `add_watch` won't return an error. //! # use std::fs::File; //! # let mut test_file = File::create("/tmp/inotify-rs-test-file") //! # .expect("Failed to create test file"); //! # //! // Watch for modify and close events. //! inotify -//! .watches() -//! .add( +//! .add_watch( //! "/tmp/inotify-rs-test-file", //! WatchMask::MODIFY | WatchMask::CLOSE, //! ) @@ -38,7 +37,7 @@ //! # write!(&mut test_file, "something\n") //! # .expect("Failed to write something to test file"); //! # -//! // Read events that were added with `Watches::add` above. +//! // Read events that were added with `add_watch` above. //! let mut buffer = [0; 1024]; //! let events = inotify.read_events_blocking(&mut buffer) //! .expect("Error while reading events"); diff --git a/vendor/inotify/src/stream.rs b/vendor/inotify/src/stream.rs index 65a2e3c7f87d4b7380036bbd2c7f8b5ca0402138..bad0ec1345e388a8e125a091b01d7eb77387d810 100644 --- a/vendor/inotify/src/stream.rs +++ b/vendor/inotify/src/stream.rs @@ -11,15 +11,13 @@ use tokio::io::unix::AsyncFd; use crate::events::{Event, EventOwned}; use crate::fd_guard::FdGuard; -use crate::Inotify; use crate::util::read_into_buffer; -use crate::watches::Watches; /// Stream of inotify events /// -/// Allows for streaming events returned by [`Inotify::into_event_stream`]. +/// Allows for streaming events returned by [`Inotify::event_stream`]. /// -/// [`Inotify::into_event_stream`]: struct.Inotify.html#method.into_event_stream +/// [`Inotify::event_stream`]: struct.Inotify.html#method.event_stream #[derive(Debug)] pub struct EventStream { fd: AsyncFd, @@ -36,26 +34,11 @@ where pub(crate) fn new(fd: Arc, buffer: T) -> io::Result { Ok(EventStream { fd: AsyncFd::new(ArcFdGuard(fd))?, - buffer, + buffer: buffer, buffer_pos: 0, unused_bytes: 0, }) } - - /// Returns an instance of `Watches` to add and remove watches. - /// See [`Watches::add`] and [`Watches::remove`]. - /// - /// [`Watches::add`]: struct.Watches.html#method.add - /// [`Watches::remove`]: struct.Watches.html#method.remove - pub fn watches(&self) -> Watches { - Watches::new(self.fd.get_ref().0.clone()) - } - - /// Consumes the `EventStream` instance and returns an `Inotify` using the original - /// file descriptor that was passed from `Inotify` to create the `EventStream`. - pub fn into_inotify(self) -> Inotify { - Inotify::from_file_descriptor(self.fd.into_inner().0) - } } impl Stream for EventStream @@ -90,7 +73,7 @@ where self_.buffer_pos += bytes_consumed; self_.unused_bytes -= bytes_consumed; - Poll::Ready(Some(Ok(event.to_owned()))) + Poll::Ready(Some(Ok(event.into_owned()))) } } diff --git a/vendor/inotify/src/util.rs b/vendor/inotify/src/util.rs index 24f8eedb3fa8241631282615eaae2f1b386eefd8..25ddb03b9a620dc14370ba3ace2b9d80a86bd490 100644 --- a/vendor/inotify/src/util.rs +++ b/vendor/inotify/src/util.rs @@ -15,6 +15,9 @@ const INOTIFY_EVENT_SIZE: usize = mem::size_of::() + 257; pub fn read_into_buffer(fd: RawFd, buffer: &mut [u8]) -> isize { unsafe { + // Discard the unaligned portion, if any, of the supplied buffer + let buffer = align_buffer_mut(buffer); + ffi::read( fd, buffer.as_mut_ptr() as *mut c_void, @@ -23,6 +26,26 @@ pub fn read_into_buffer(fd: RawFd, buffer: &mut [u8]) -> isize { } } +pub fn align_buffer(buffer: &[u8]) -> &[u8] { + if buffer.len() >= mem::align_of::() { + let ptr = buffer.as_ptr(); + let offset = ptr.align_offset(mem::align_of::()); + &buffer[offset..] + } else { + &buffer[0..0] + } +} + +pub fn align_buffer_mut(buffer: &mut [u8]) -> &mut [u8] { + if buffer.len() >= mem::align_of::() { + let ptr = buffer.as_mut_ptr(); + let offset = ptr.align_offset(mem::align_of::()); + &mut buffer[offset..] + } else { + &mut buffer[0..0] + } +} + /// Get the inotify event buffer size /// /// The maximum size of an inotify event and thus the buffer size to hold it diff --git a/vendor/inotify/src/watches.rs b/vendor/inotify/src/watches.rs index a91ba22200fa34861a9c7d25ac985a32a4602230..81ff0052958d7aefdd0ae04d275137be30335967 100644 --- a/vendor/inotify/src/watches.rs +++ b/vendor/inotify/src/watches.rs @@ -1,33 +1,27 @@ use std::{ - cmp::Ordering, - ffi::CString, hash::{ Hash, Hasher, }, - io, + cmp::Ordering, os::raw::c_int, - os::unix::ffi::OsStrExt, - path::Path, - sync::{ - Arc, - Weak, - }, + sync::Weak, }; use inotify_sys as ffi; use crate::fd_guard::FdGuard; + bitflags! { /// Describes a file system watch /// - /// Passed to [`Watches::add`], to describe what file system events + /// Passed to [`Inotify::add_watch`], to describe what file system events /// to watch for, and how to do that. /// /// # Examples /// - /// `WatchMask` constants can be passed to [`Watches::add`] as is. For + /// `WatchMask` constants can be passed to [`Inotify::add_watch`] as is. For /// example, here's how to create a watch that triggers an event when a file /// is accessed: /// @@ -39,12 +33,12 @@ bitflags! { /// # /// # let mut inotify = Inotify::init().unwrap(); /// # - /// # // Create a temporary file, so `Watches::add` won't return an error. + /// # // Create a temporary file, so `add_watch` won't return an error. /// # use std::fs::File; /// # File::create("/tmp/inotify-rs-test-file") /// # .expect("Failed to create test file"); /// # - /// inotify.watches().add("/tmp/inotify-rs-test-file", WatchMask::ACCESS) + /// inotify.add_watch("/tmp/inotify-rs-test-file", WatchMask::ACCESS) /// .expect("Error adding watch"); /// ``` /// @@ -58,11 +52,11 @@ bitflags! { /// # }; /// # /// # let mut inotify = Inotify::init().unwrap(); - /// inotify.watches().add("/tmp/", WatchMask::CREATE | WatchMask::DELETE) + /// inotify.add_watch("/tmp/", WatchMask::CREATE | WatchMask::DELETE) /// .expect("Error adding watch"); /// ``` /// - /// [`Watches::add`]: struct.Watches.html#method.add + /// [`Inotify::add_watch`]: struct.Inotify.html#method.add_watch pub struct WatchMask: u32 { /// File was accessed /// @@ -280,193 +274,15 @@ bitflags! { } } -impl WatchDescriptor { - /// Getter method for a watcher's id. - /// - /// Can be used to distinguish events for files with the same name. - pub fn get_watch_descriptor_id(&self) -> c_int { - self.id - } -} - -/// Interface for adding and removing watches -#[derive(Clone, Debug)] -pub struct Watches { - pub(crate) fd: Arc, -} - -impl Watches { - /// Init watches with an inotify file descriptor - pub(crate) fn new(fd: Arc) -> Self { - Watches { - fd, - } - } - - /// Adds or updates a watch for the given path - /// - /// Adds a new watch or updates an existing one for the file referred to by - /// `path`. Returns a watch descriptor that can be used to refer to this - /// watch later. - /// - /// The `mask` argument defines what kind of changes the file should be - /// watched for, and how to do that. See the documentation of [`WatchMask`] - /// for details. - /// - /// If this method is used to add a new watch, a new [`WatchDescriptor`] is - /// returned. If it is used to update an existing watch, a - /// [`WatchDescriptor`] that equals the previously returned - /// [`WatchDescriptor`] for that watch is returned instead. - /// - /// Under the hood, this method just calls [`inotify_add_watch`] and does - /// some trivial translation between the types on the Rust side and the C - /// side. - /// - /// # Attention: Updating watches and hardlinks - /// - /// As mentioned above, this method can be used to update an existing watch. - /// This is usually done by calling this method with the same `path` - /// argument that it has been called with before. But less obviously, it can - /// also happen if the method is called with a different path that happens - /// to link to the same inode. - /// - /// You can detect this by keeping track of [`WatchDescriptor`]s and the - /// paths they have been returned for. If the same [`WatchDescriptor`] is - /// returned for a different path (and you haven't freed the - /// [`WatchDescriptor`] by removing the watch), you know you have two paths - /// pointing to the same inode, being watched by the same watch. - /// - /// # Errors - /// - /// Directly returns the error from the call to - /// [`inotify_add_watch`][`inotify_add_watch`] (translated into an - /// `io::Error`), without adding any error conditions of - /// its own. - /// - /// # Examples - /// - /// ``` - /// use inotify::{ - /// Inotify, - /// WatchMask, - /// }; - /// - /// let mut inotify = Inotify::init() - /// .expect("Failed to initialize an inotify instance"); - /// - /// # // Create a temporary file, so `Watches::add` won't return an error. - /// # use std::fs::File; - /// # File::create("/tmp/inotify-rs-test-file") - /// # .expect("Failed to create test file"); - /// # - /// inotify.watches().add("/tmp/inotify-rs-test-file", WatchMask::MODIFY) - /// .expect("Failed to add file watch"); - /// - /// // Handle events for the file here - /// ``` - /// - /// [`inotify_add_watch`]: ../inotify_sys/fn.inotify_add_watch.html - /// [`WatchMask`]: struct.WatchMask.html - /// [`WatchDescriptor`]: struct.WatchDescriptor.html - pub fn add

(&mut self, path: P, mask: WatchMask) - -> io::Result - where P: AsRef - { - let path = CString::new(path.as_ref().as_os_str().as_bytes())?; - - let wd = unsafe { - ffi::inotify_add_watch( - **self.fd, - path.as_ptr() as *const _, - mask.bits(), - ) - }; - - match wd { - -1 => Err(io::Error::last_os_error()), - _ => Ok(WatchDescriptor{ id: wd, fd: Arc::downgrade(&self.fd) }), - } - } - - /// Stops watching a file - /// - /// Removes the watch represented by the provided [`WatchDescriptor`] by - /// calling [`inotify_rm_watch`]. [`WatchDescriptor`]s can be obtained via - /// [`Watches::add`], or from the `wd` field of [`Event`]. - /// - /// # Errors - /// - /// Directly returns the error from the call to [`inotify_rm_watch`]. - /// Returns an [`io::Error`] with [`ErrorKind`]`::InvalidInput`, if the given - /// [`WatchDescriptor`] did not originate from this [`Inotify`] instance. - /// - /// # Examples - /// - /// ``` - /// use inotify::Inotify; - /// - /// let mut inotify = Inotify::init() - /// .expect("Failed to initialize an inotify instance"); - /// - /// # // Create a temporary file, so `Watches::add` won't return an error. - /// # use std::fs::File; - /// # let mut test_file = File::create("/tmp/inotify-rs-test-file") - /// # .expect("Failed to create test file"); - /// # - /// # // Add a watch and modify the file, so the code below doesn't block - /// # // forever. - /// # use inotify::WatchMask; - /// # inotify.watches().add("/tmp/inotify-rs-test-file", WatchMask::MODIFY) - /// # .expect("Failed to add file watch"); - /// # use std::io::Write; - /// # write!(&mut test_file, "something\n") - /// # .expect("Failed to write something to test file"); - /// # - /// let mut buffer = [0; 1024]; - /// let events = inotify - /// .read_events_blocking(&mut buffer) - /// .expect("Error while waiting for events"); - /// let mut watches = inotify.watches(); - /// - /// for event in events { - /// watches.remove(event.wd); - /// } - /// ``` - /// - /// [`WatchDescriptor`]: struct.WatchDescriptor.html - /// [`inotify_rm_watch`]: ../inotify_sys/fn.inotify_rm_watch.html - /// [`Watches::add`]: struct.Watches.html#method.add - /// [`Event`]: struct.Event.html - /// [`Inotify`]: struct.Inotify.html - /// [`io::Error`]: https://doc.rust-lang.org/std/io/struct.Error.html - /// [`ErrorKind`]: https://doc.rust-lang.org/std/io/enum.ErrorKind.html - pub fn remove(&mut self, wd: WatchDescriptor) -> io::Result<()> { - if wd.fd.upgrade().as_ref() != Some(&self.fd) { - return Err(io::Error::new( - io::ErrorKind::InvalidInput, - "Invalid WatchDescriptor", - )); - } - - let result = unsafe { ffi::inotify_rm_watch(**self.fd, wd.id) }; - match result { - 0 => Ok(()), - -1 => Err(io::Error::last_os_error()), - _ => panic!( - "unexpected return code from inotify_rm_watch ({})", result) - } - } -} - /// Represents a watch on an inode /// -/// Can be obtained from [`Watches::add`] or from an [`Event`]. A watch +/// Can be obtained from [`Inotify::add_watch`] or from an [`Event`]. A watch /// descriptor can be used to get inotify to stop watching an inode by passing -/// it to [`Watches::remove`]. +/// it to [`Inotify::rm_watch`]. /// -/// [`Watches::add`]: struct.Watches.html#method.add -/// [`Watches::remove`]: struct.Watches.html#method.remove +/// [`Inotify::add_watch`]: struct.Inotify.html#method.add_watch +/// [`Inotify::rm_watch`]: struct.Inotify.html#method.rm_watch /// [`Event`]: struct.Event.html #[derive(Clone, Debug)] pub struct WatchDescriptor{ diff --git a/vendor/inotify/tests/main.rs b/vendor/inotify/tests/main.rs index 4f9633ca29b03b23b6f98ea47cbd831eace1e564..eda57ad72b0fb88e81e9d60b6b29d52e75d16160 100644 --- a/vendor/inotify/tests/main.rs +++ b/vendor/inotify/tests/main.rs @@ -6,7 +6,7 @@ use inotify::{ Inotify, - WatchMask + WatchMask, }; use std::fs::File; use std::io::{ @@ -21,17 +21,6 @@ use std::os::unix::io::{ use std::path::PathBuf; use tempfile::TempDir; -#[cfg(feature = "stream")] -use maplit::hashmap; -#[cfg(feature = "stream")] -use inotify::EventMask; -#[cfg(feature = "stream")] -use rand::{thread_rng, prelude::SliceRandom}; -#[cfg(feature = "stream")] -use std::sync::{Mutex, Arc}; -#[cfg(feature = "stream")] -use futures_util::StreamExt; - #[test] fn it_should_watch_a_file() { @@ -39,7 +28,7 @@ fn it_should_watch_a_file() { let (path, mut file) = testdir.new_file(); let mut inotify = Inotify::init().unwrap(); - let watch = inotify.watches().add(&path, WatchMask::MODIFY).unwrap(); + let watch = inotify.add_watch(&path, WatchMask::MODIFY).unwrap(); write_to(&mut file); @@ -60,16 +49,8 @@ async fn it_should_watch_a_file_async() { let mut testdir = TestDir::new(); let (path, mut file) = testdir.new_file(); - let inotify = Inotify::init().unwrap(); - - // Hold ownership of `watches` for this test, so that the underlying file descriptor has - // at least one reference to keep it alive, and we can inspect the WatchDescriptors below. - // Otherwise the `Weak` contained in the WatchDescriptors will be invalidated - // when `inotify` is consumed by `into_event_stream()` and the EventStream is dropped - // during `await`. - let mut watches = inotify.watches(); - - let watch = watches.add(&path, WatchMask::MODIFY).unwrap(); + let mut inotify = Inotify::init().unwrap(); + let watch = inotify.add_watch(&path, WatchMask::MODIFY).unwrap(); write_to(&mut file); @@ -77,7 +58,7 @@ async fn it_should_watch_a_file_async() { use futures_util::StreamExt; let events = inotify - .into_event_stream(&mut buffer[..]) + .event_stream(&mut buffer[..]) .unwrap() .take(1) .collect::>() @@ -93,75 +74,12 @@ async fn it_should_watch_a_file_async() { assert!(num_events > 0); } -#[cfg(feature = "stream")] -#[tokio::test] -async fn it_should_watch_a_file_from_eventstream_watches() { - let mut testdir = TestDir::new(); - let (path, mut file) = testdir.new_file(); - - let inotify = Inotify::init().unwrap(); - - let mut buffer = [0; 1024]; - - use futures_util::StreamExt; - let stream = inotify.into_event_stream(&mut buffer[..]).unwrap(); - - // Hold ownership of `watches` for this test, so that the underlying file descriptor has - // at least one reference to keep it alive, and we can inspect the WatchDescriptors below. - // Otherwise the `Weak` contained in the WatchDescriptors will be invalidated - // when `stream` is dropped during `await`. - let mut watches = stream.watches(); - - let watch = watches.add(&path, WatchMask::MODIFY).unwrap(); - write_to(&mut file); - - let events = stream - .take(1) - .collect::>() - .await; - - let mut num_events = 0; - for event in events { - if let Ok(event) = event { - assert_eq!(watch, event.wd); - num_events += 1; - } - } - assert!(num_events > 0); -} - -#[cfg(feature = "stream")] -#[tokio::test] -async fn it_should_watch_a_file_after_converting_back_from_eventstream() { - let mut testdir = TestDir::new(); - let (path, mut file) = testdir.new_file(); - - let inotify = Inotify::init().unwrap(); - - let mut buffer = [0; 1024]; - let stream = inotify.into_event_stream(&mut buffer[..]).unwrap(); - let mut inotify = stream.into_inotify(); - - let watch = inotify.watches().add(&path, WatchMask::MODIFY).unwrap(); - - write_to(&mut file); - - let events = inotify.read_events_blocking(&mut buffer).unwrap(); - - let mut num_events = 0; - for event in events { - assert_eq!(watch, event.wd); - num_events += 1; - } - assert!(num_events > 0); -} - #[test] fn it_should_return_immediately_if_no_events_are_available() { let mut inotify = Inotify::init().unwrap(); let mut buffer = [0; 1024]; - assert_eq!(inotify.read_events(&mut buffer).unwrap_err().kind(), ErrorKind::WouldBlock); + assert_eq!(0, inotify.read_events(&mut buffer).unwrap().count()); } #[test] @@ -170,7 +88,7 @@ fn it_should_convert_the_name_into_an_os_str() { let (path, mut file) = testdir.new_file(); let mut inotify = Inotify::init().unwrap(); - inotify.watches().add(&path.parent().unwrap(), WatchMask::MODIFY).unwrap(); + inotify.add_watch(&path.parent().unwrap(), WatchMask::MODIFY).unwrap(); write_to(&mut file); @@ -191,7 +109,7 @@ fn it_should_set_name_to_none_if_it_is_empty() { let (path, mut file) = testdir.new_file(); let mut inotify = Inotify::init().unwrap(); - inotify.watches().add(&path, WatchMask::MODIFY).unwrap(); + inotify.add_watch(&path, WatchMask::MODIFY).unwrap(); write_to(&mut file); @@ -211,13 +129,13 @@ fn it_should_not_accept_watchdescriptors_from_other_instances() { let mut testdir = TestDir::new(); let (path, _) = testdir.new_file(); - let inotify = Inotify::init().unwrap(); - let _ = inotify.watches().add(&path, WatchMask::ACCESS).unwrap(); + let mut inotify = Inotify::init().unwrap(); + let _ = inotify.add_watch(&path, WatchMask::ACCESS).unwrap(); - let second_inotify = Inotify::init().unwrap(); - let wd2 = second_inotify.watches().add(&path, WatchMask::ACCESS).unwrap(); + let mut second_inotify = Inotify::init().unwrap(); + let wd2 = second_inotify.add_watch(&path, WatchMask::ACCESS).unwrap(); - assert_eq!(inotify.watches().remove(wd2).unwrap_err().kind(), ErrorKind::InvalidInput); + assert_eq!(inotify.rm_watch(wd2).unwrap_err().kind(), ErrorKind::InvalidInput); } #[test] @@ -225,18 +143,16 @@ fn watch_descriptors_from_different_inotify_instances_should_not_be_equal() { let mut testdir = TestDir::new(); let (path, _) = testdir.new_file(); - let inotify_1 = Inotify::init() + let mut inotify_1 = Inotify::init() .unwrap(); - let inotify_2 = Inotify::init() + let mut inotify_2 = Inotify::init() .unwrap(); let wd_1 = inotify_1 - .watches() - .add(&path, WatchMask::ACCESS) + .add_watch(&path, WatchMask::ACCESS) .unwrap(); let wd_2 = inotify_2 - .watches() - .add(&path, WatchMask::ACCESS) + .add_watch(&path, WatchMask::ACCESS) .unwrap(); // As far as inotify is concerned, watch descriptors are just integers that @@ -257,13 +173,12 @@ fn watch_descriptor_equality_should_not_be_confused_by_reused_fds() { // old one. // This is quite likely, but it doesn't happen every time. Therefore we may // need a few tries until we find two instances where that is the case. - let (wd_1, inotify_2) = loop { - let inotify_1 = Inotify::init() + let (wd_1, mut inotify_2) = loop { + let mut inotify_1 = Inotify::init() .unwrap(); let wd_1 = inotify_1 - .watches() - .add(&path, WatchMask::ACCESS) + .add_watch(&path, WatchMask::ACCESS) .unwrap(); let fd_1 = inotify_1.as_raw_fd(); @@ -279,8 +194,7 @@ fn watch_descriptor_equality_should_not_be_confused_by_reused_fds() { }; let wd_2 = inotify_2 - .watches() - .add(&path, WatchMask::ACCESS) + .add_watch(&path, WatchMask::ACCESS) .unwrap(); // The way we engineered this situation, both `WatchDescriptor` instances @@ -311,96 +225,10 @@ fn it_should_implement_raw_fd_traits_correctly() { let mut buffer = [0; 1024]; if let Err(error) = inotify.read_events(&mut buffer) { - if error.kind() != ErrorKind::WouldBlock { - panic!("Failed to add watch: {}", error); - } + panic!("Failed to add watch: {}", error); } } -#[test] -fn it_should_watch_correctly_with_a_watches_clone() { - let mut testdir = TestDir::new(); - let (path, mut file) = testdir.new_file(); - - let mut inotify = Inotify::init().unwrap(); - let mut watches1 = inotify.watches(); - let mut watches2 = watches1.clone(); - let watch1 = watches1.add(&path, WatchMask::MODIFY).unwrap(); - let watch2 = watches2.add(&path, WatchMask::MODIFY).unwrap(); - - // same path and same Inotify should return same descriptor - assert_eq!(watch1, watch2); - - write_to(&mut file); - - let mut buffer = [0; 1024]; - let events = inotify.read_events_blocking(&mut buffer).unwrap(); - - let mut num_events = 0; - for event in events { - assert_eq!(watch2, event.wd); - num_events += 1; - } - assert!(num_events > 0); -} - -#[cfg(feature = "stream")] -#[tokio::test] -/// Testing if two files with the same name but different directories -/// (e.g. "file_a" and "another_dir/file_a") are distinguished when _randomly_ -/// triggering a DELETE_SELF for the two files. -async fn it_should_distinguish_event_for_files_with_same_name() { - let mut testdir = TestDir::new(); - let testdir_path = testdir.dir.path().to_owned(); - let file_order = Arc::new(Mutex::new(vec!["file_a", "another_dir/file_a"])); - file_order.lock().unwrap().shuffle(&mut thread_rng()); - let file_order_clone = file_order.clone(); - - let inotify = Inotify::init().expect("Failed to initialize inotify instance"); - - // creating file_a inside `TestDir.dir` - let (path_1, _) = testdir.new_file_with_name("file_a"); - // creating a directory inside `TestDir.dir` - testdir.new_directory_with_name("another_dir"); - // creating a file inside `TestDir.dir/another_dir` - let (path_2, _) = testdir.new_file_in_directory_with_name("another_dir", "file_a"); - - // watching both files for `DELETE_SELF` - let wd_1 = inotify.watches().add(&path_1, WatchMask::DELETE_SELF).unwrap(); - let wd_2 = inotify.watches().add(&path_2, WatchMask::DELETE_SELF).unwrap(); - - let expected_ids = hashmap! { - wd_1.get_watch_descriptor_id() => "file_a", - wd_2.get_watch_descriptor_id() => "another_dir/file_a" - }; - let mut buffer = [0; 1024]; - - let file_removal_handler = tokio::spawn(async move { - for file in file_order.lock().unwrap().iter() { - testdir.delete_file(file); - } - }); - - let event_handle = tokio::spawn(async move { - let mut events = inotify.into_event_stream(&mut buffer).unwrap(); - while let Some(Ok(event)) = events.next().await { - if event.mask == EventMask::DELETE_SELF { - let id = event.wd.get_watch_descriptor_id(); - let file = expected_ids.get(&id).unwrap(); - let full_path = testdir_path.join(*file); - println!("file {:?} was deleted", full_path); - file_order_clone.lock().unwrap().retain(|&x| x != *file); - - if file_order_clone.lock().unwrap().is_empty() { - break; - } - } - } - }); - - let () = event_handle.await.unwrap(); - let () = file_removal_handler.await.unwrap(); -} struct TestDir { dir: TempDir, @@ -415,45 +243,6 @@ impl TestDir { } } - #[cfg(feature = "stream")] - fn new_file_with_name(&mut self, file_name: &str) -> (PathBuf, File) { - self.counter += 1; - - let path = self.dir.path().join(file_name); - let file = File::create(&path) - .unwrap_or_else(|error| panic!("Failed to create temporary file: {}", error)); - - (path, file) - } - - #[cfg(feature = "stream")] - fn delete_file(&mut self, relative_path_to_file: &str) { - let path = &self.dir.path().join(relative_path_to_file); - std::fs::remove_file(path).unwrap(); - } - - #[cfg(feature = "stream")] - fn new_file_in_directory_with_name( - &mut self, - dir_name: &str, - file_name: &str, - ) -> (PathBuf, File) { - self.counter += 1; - - let path = self.dir.path().join(dir_name).join(file_name); - let file = File::create(&path) - .unwrap_or_else(|error| panic!("Failed to create temporary file: {}", error)); - - (path, file) - } - - #[cfg(feature = "stream")] - fn new_directory_with_name(&mut self, dir_name: &str) -> PathBuf { - let path = self.dir.path().join(dir_name); - let () = std::fs::create_dir(&path).unwrap(); - path.to_path_buf() - } - fn new_file(&mut self) -> (PathBuf, File) { let id = self.counter; self.counter += 1; diff --git a/vendor/js-sys/.cargo-checksum.json b/vendor/js-sys/.cargo-checksum.json index cc829a7e49841e47623c4d370a56de514c5f4f55..3db3d058b7456ed51416f85b0a3ea5353fa84bea 100644 --- a/vendor/js-sys/.cargo-checksum.json +++ b/vendor/js-sys/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"3441ebc3918099baefa15652602bb1b2a06e1fc1de9d95e23079ef7b22832fdc","Cargo.toml":"ea8aebd6b8068c24707afd77265a5aaf1f32ba9d7ec26aaa5fe8a941808c844d","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"de73c6d7a9d9eac0674770fde362175700676be0dfaee0b22d4c75fdc28b068e","src/Temporal.rs":"6c3745bf5cbfbbaee3fabecd870c50669f7a4f1ee65fc96e2baa8f3e440cfe86","src/lib.rs":"ae64492170f037bf6e45923e0457ab393e4a89cceb675a26ce33dc0d3a326756","tests/headless.js":"dc0fdafb377cd6aa1415897083bbbf3d53c0ca39fc1691cc1f1fa7c528190491","tests/headless.rs":"f9eb68e88cc40fc81b7afad881fbdf2243d574f4417705226aa2102a71187e60","tests/wasm/Array.js":"c21d3d69f388ed4574fa7670c4a41240d0cfa2a374ed29f32f93069983138c72","tests/wasm/Array.rs":"a72124c18addf94bd5a8c96c2f5ee59ba6f387dff404576a5295b52dda96879d","tests/wasm/ArrayBuffer.rs":"a465e7cf7114e7466eb843f6612e22f00eb070dda15759bf8c62a1a3147a8c8d","tests/wasm/ArrayIterator.rs":"d849e50fbb8ebf6979e962c89210cf278176b15198c37f59cb15337e9c30ffa0","tests/wasm/BigInt.rs":"55a8070545f477acea07aebccad1bfd36bac88202923c357f894d6721046f53e","tests/wasm/Boolean.rs":"a7ce23aac1cb7abb83ad92dfaec751cd89f8e5047043667f6cc37d36bbd8cfc3","tests/wasm/DataView.rs":"b1bea4a6235c406ca1df0e12daec95158c5fb663f3733a8cf986038770ae23a7","tests/wasm/Date.rs":"4de15246207a5f4c961f448dd18c743aa4ae45950571c9e4ec948272677bf584","tests/wasm/Error.rs":"3d593bdce1dee56fa2c35c290d499d687cc7f08971f89f7aa5f9b52d73af1546","tests/wasm/EvalError.rs":"638641bdd06bb43cffee89d37cd39ee615fe98d44d4c8278756a798a6593111f","tests/wasm/Function.js":"6c5876f74cf2838823470c4c007089baa17e2b28e4f602b65a4b2bc67073b9d7","tests/wasm/Function.rs":"2ccfd94e301b569d70face86d31843d095380973673a811302fb67d8d58378fe","tests/wasm/Generator.js":"7be85b1acbc2de5c3d9d8d64a396baf8c5a5b111905759315b3b395a22ea49e2","tests/wasm/Generator.rs":"860e51ccd01a06076b713445a2eff27244f5b349211a322aa9e3e8df2e76c8ce","tests/wasm/Intl.rs":"93ffd147882daca4f482aaa6d18d013c854dfd0bd3d7631e6128c91e88612cc2","tests/wasm/Iterator.js":"525d29257a508e0cfcf4aa01dddd522d1dda6f8f968f271802ebd703e6f347d6","tests/wasm/Iterator.rs":"b2ac023d150179c0c3cd54f27f9b2775f62ad519111dc233e9ebbad5e9983193","tests/wasm/JSON.rs":"a8bf63aa9cbc64448ad320d88224f435cd2980f980b1c0da3ff1c8c3a935399e","tests/wasm/JsString.js":"931aedd837c316bd7e1e2d52142a92d663e36b79995e2dde6d91c9d762095c13","tests/wasm/JsString.rs":"6aa441665ee43d84b13ec0b021d4544b5b0bdbe2cee2329cfb8a00770964390b","tests/wasm/Map.rs":"022b4c26387190e36726b493615f9852ce40ed0c86a97db85bcf06e9086925f2","tests/wasm/MapIterator.rs":"ed0405dbc9a74885fc3c3614d08d5b7c9da2ad14e4b8d3c5f392ad03e12c61cc","tests/wasm/Math.rs":"0604f28481ac122ee88a5198c2b4f234e3f25e266f73c8e455973d486bcf4768","tests/wasm/Number.js":"a0b161084686deee75588a01834dea2bc12fde317d96bd3a0b73c825db71180f","tests/wasm/Number.rs":"3965a281c43e26659391e02ac7fa76de93ebe582858b53f0ca764e61e922f371","tests/wasm/Object.js":"a8ab74505388012de784b2f62f00a57058632e02a3e4bf70f33fa0e5332ff384","tests/wasm/Object.rs":"c8010cd257ba0a49dc864936104cb19c59f9e7801f5b296d909b772aa1f29fb3","tests/wasm/Promise.rs":"8c62a5c08cb43c60391f94e2d697d8925ba47069e19318a30fa64062ef372c8b","tests/wasm/Proxy.js":"63baac7050190339ed772fed09e4bd1845f34bcc36d7aa40ab2ecf93e9db786a","tests/wasm/Proxy.rs":"02d5ec8e5b781e12cdd96b38e643a4d0f6b725c0c904cc614bc83d829d501035","tests/wasm/RangeError.rs":"00a75d29880f53704c1ede81fb0f5c80efa8528a7c9f75b9f64d25234f74c3a4","tests/wasm/ReferenceError.rs":"47b60df993231f4631de2b9317bc1ac0a968976747f05d9b655dc61bcf2a58b4","tests/wasm/Reflect.js":"e5c43d410802ed45f38bffe60d0313dfcb978ac29a748258e889fbb3efa6d64a","tests/wasm/Reflect.rs":"f8bd8876b6bc1740652d51b6bad948eac7eb49541a08e2fe32a85043f9e0aa65","tests/wasm/RegExp.rs":"f91a9c838921832299185582900df6132dd5263fdcce4cc5342b6a1575d727b7","tests/wasm/Set.rs":"ccd68d9240f52d5129169f999a2d782c29c3e00d77f47521c9c4c3158d4f41cd","tests/wasm/SetIterator.rs":"0ad63f4852adcd91a40ffc1d95bb269e23bc338666acdc85a9516c492d5e1561","tests/wasm/SharedArrayBuffer.js":"6d30cec14dfc5890c8303cd1b81da235bce8a37d730232fc8b0d050f0e1db1b2","tests/wasm/SharedArrayBuffer.rs":"fadefea98f3c61aa5ab04f7f5f182a5f73c3436da39c35e9b48e95e7f57a5100","tests/wasm/Symbol.js":"76c6c15f9fd34ffb7efddc90e898e12be074e9c98e066076a2b46f0554754de2","tests/wasm/Symbol.rs":"ae91d396b867bdfd9fd0c66b8863fb8e5c569886eeec98ae6cbd0ffad1a952a8","tests/wasm/SyntaxError.rs":"526ae9168f4979594e9d44f456e6b2816e38860ebf5937c2c905577aae5be7c0","tests/wasm/Temporal.js":"83312c76bdaa0893b7a6d638ccedb5a3d35f9beeb36977e608a739a81a2f4460","tests/wasm/Temporal.rs":"36423a29a94c0d1a218fe2f34384ddb5ec30c8a812ce8a4635579f0d61496b17","tests/wasm/TypeError.rs":"618530b6556daad348106bd1c48c6dd808f54fe4efb344b15238db4ec3254d9f","tests/wasm/TypedArray.rs":"daaa2eb6336ad3868db6cc27846f2c1c7bac542585236efaee23defb20818002","tests/wasm/UriError.rs":"2e695b4823e8875aa72c41aa6679e4d3f924adf47b763cb4462cf96ecdacfda6","tests/wasm/WeakMap.rs":"930498b116924eda0d40ea11c73adbfc049ffd0f11e259f1faf29e090eeea853","tests/wasm/WeakSet.rs":"59c80b6ac0f60fe8499884ee4842b8a4f12039c6c29c58a329e85c187d42c94c","tests/wasm/WebAssembly.js":"5870c3811c8c17bab0b0e14c5ed62af987b8fa52382572a27cf704cded30f061","tests/wasm/WebAssembly.rs":"7b234b6dcea00d9cd37854de020247facd22af90ef1012b5d1a1b35f7c828cb8","tests/wasm/global_fns.rs":"34e12bfd548b8710297087920599d97e31971d142a8b0c4acb5712f71f1213d3","tests/wasm/main.rs":"e07b9a62897df33dba3d0962f403b19574d5cd99cd2e08e316be364c7a73d7e7"},"package":"2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790"} \ No newline at end of file +{"files":{"CHANGELOG.md":"3441ebc3918099baefa15652602bb1b2a06e1fc1de9d95e23079ef7b22832fdc","Cargo.toml":"fda82b2c1df8f510ee2268c8ee1c336f8a842f062c6b4f0b6a7a10eae2a8cef6","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"de73c6d7a9d9eac0674770fde362175700676be0dfaee0b22d4c75fdc28b068e","src/Temporal.rs":"6c3745bf5cbfbbaee3fabecd870c50669f7a4f1ee65fc96e2baa8f3e440cfe86","src/lib.rs":"455c34bb3cba6d5abe4ea06145c18533bbc17af892a75714f02a4642c14e98d1","tests/headless.js":"dc0fdafb377cd6aa1415897083bbbf3d53c0ca39fc1691cc1f1fa7c528190491","tests/headless.rs":"f9eb68e88cc40fc81b7afad881fbdf2243d574f4417705226aa2102a71187e60","tests/wasm/Array.js":"c21d3d69f388ed4574fa7670c4a41240d0cfa2a374ed29f32f93069983138c72","tests/wasm/Array.rs":"a72124c18addf94bd5a8c96c2f5ee59ba6f387dff404576a5295b52dda96879d","tests/wasm/ArrayBuffer.rs":"a465e7cf7114e7466eb843f6612e22f00eb070dda15759bf8c62a1a3147a8c8d","tests/wasm/ArrayIterator.rs":"d849e50fbb8ebf6979e962c89210cf278176b15198c37f59cb15337e9c30ffa0","tests/wasm/BigInt.rs":"55a8070545f477acea07aebccad1bfd36bac88202923c357f894d6721046f53e","tests/wasm/Boolean.rs":"a7ce23aac1cb7abb83ad92dfaec751cd89f8e5047043667f6cc37d36bbd8cfc3","tests/wasm/DataView.rs":"31c672e3771a9ab17da801c8cd83650d7c1dd8598bb42fbcb78ea42ad5ab8c77","tests/wasm/Date.rs":"4de15246207a5f4c961f448dd18c743aa4ae45950571c9e4ec948272677bf584","tests/wasm/Error.rs":"3d593bdce1dee56fa2c35c290d499d687cc7f08971f89f7aa5f9b52d73af1546","tests/wasm/EvalError.rs":"638641bdd06bb43cffee89d37cd39ee615fe98d44d4c8278756a798a6593111f","tests/wasm/Function.js":"6c5876f74cf2838823470c4c007089baa17e2b28e4f602b65a4b2bc67073b9d7","tests/wasm/Function.rs":"2ccfd94e301b569d70face86d31843d095380973673a811302fb67d8d58378fe","tests/wasm/Generator.js":"7be85b1acbc2de5c3d9d8d64a396baf8c5a5b111905759315b3b395a22ea49e2","tests/wasm/Generator.rs":"860e51ccd01a06076b713445a2eff27244f5b349211a322aa9e3e8df2e76c8ce","tests/wasm/Intl.rs":"93ffd147882daca4f482aaa6d18d013c854dfd0bd3d7631e6128c91e88612cc2","tests/wasm/Iterator.js":"525d29257a508e0cfcf4aa01dddd522d1dda6f8f968f271802ebd703e6f347d6","tests/wasm/Iterator.rs":"b2ac023d150179c0c3cd54f27f9b2775f62ad519111dc233e9ebbad5e9983193","tests/wasm/JSON.rs":"a8bf63aa9cbc64448ad320d88224f435cd2980f980b1c0da3ff1c8c3a935399e","tests/wasm/JsString.js":"931aedd837c316bd7e1e2d52142a92d663e36b79995e2dde6d91c9d762095c13","tests/wasm/JsString.rs":"6aa441665ee43d84b13ec0b021d4544b5b0bdbe2cee2329cfb8a00770964390b","tests/wasm/Map.rs":"022b4c26387190e36726b493615f9852ce40ed0c86a97db85bcf06e9086925f2","tests/wasm/MapIterator.rs":"ed0405dbc9a74885fc3c3614d08d5b7c9da2ad14e4b8d3c5f392ad03e12c61cc","tests/wasm/Math.rs":"0604f28481ac122ee88a5198c2b4f234e3f25e266f73c8e455973d486bcf4768","tests/wasm/Number.js":"a0b161084686deee75588a01834dea2bc12fde317d96bd3a0b73c825db71180f","tests/wasm/Number.rs":"3965a281c43e26659391e02ac7fa76de93ebe582858b53f0ca764e61e922f371","tests/wasm/Object.js":"a8ab74505388012de784b2f62f00a57058632e02a3e4bf70f33fa0e5332ff384","tests/wasm/Object.rs":"c8010cd257ba0a49dc864936104cb19c59f9e7801f5b296d909b772aa1f29fb3","tests/wasm/Promise.rs":"8c62a5c08cb43c60391f94e2d697d8925ba47069e19318a30fa64062ef372c8b","tests/wasm/Proxy.js":"63baac7050190339ed772fed09e4bd1845f34bcc36d7aa40ab2ecf93e9db786a","tests/wasm/Proxy.rs":"02d5ec8e5b781e12cdd96b38e643a4d0f6b725c0c904cc614bc83d829d501035","tests/wasm/RangeError.rs":"00a75d29880f53704c1ede81fb0f5c80efa8528a7c9f75b9f64d25234f74c3a4","tests/wasm/ReferenceError.rs":"47b60df993231f4631de2b9317bc1ac0a968976747f05d9b655dc61bcf2a58b4","tests/wasm/Reflect.js":"e5c43d410802ed45f38bffe60d0313dfcb978ac29a748258e889fbb3efa6d64a","tests/wasm/Reflect.rs":"f8bd8876b6bc1740652d51b6bad948eac7eb49541a08e2fe32a85043f9e0aa65","tests/wasm/RegExp.rs":"f91a9c838921832299185582900df6132dd5263fdcce4cc5342b6a1575d727b7","tests/wasm/Set.rs":"ccd68d9240f52d5129169f999a2d782c29c3e00d77f47521c9c4c3158d4f41cd","tests/wasm/SetIterator.rs":"0ad63f4852adcd91a40ffc1d95bb269e23bc338666acdc85a9516c492d5e1561","tests/wasm/SharedArrayBuffer.js":"6d30cec14dfc5890c8303cd1b81da235bce8a37d730232fc8b0d050f0e1db1b2","tests/wasm/SharedArrayBuffer.rs":"fadefea98f3c61aa5ab04f7f5f182a5f73c3436da39c35e9b48e95e7f57a5100","tests/wasm/Symbol.js":"76c6c15f9fd34ffb7efddc90e898e12be074e9c98e066076a2b46f0554754de2","tests/wasm/Symbol.rs":"ae91d396b867bdfd9fd0c66b8863fb8e5c569886eeec98ae6cbd0ffad1a952a8","tests/wasm/SyntaxError.rs":"526ae9168f4979594e9d44f456e6b2816e38860ebf5937c2c905577aae5be7c0","tests/wasm/Temporal.js":"83312c76bdaa0893b7a6d638ccedb5a3d35f9beeb36977e608a739a81a2f4460","tests/wasm/Temporal.rs":"36423a29a94c0d1a218fe2f34384ddb5ec30c8a812ce8a4635579f0d61496b17","tests/wasm/TypeError.rs":"618530b6556daad348106bd1c48c6dd808f54fe4efb344b15238db4ec3254d9f","tests/wasm/TypedArray.rs":"daaa2eb6336ad3868db6cc27846f2c1c7bac542585236efaee23defb20818002","tests/wasm/UriError.rs":"2e695b4823e8875aa72c41aa6679e4d3f924adf47b763cb4462cf96ecdacfda6","tests/wasm/WeakMap.rs":"930498b116924eda0d40ea11c73adbfc049ffd0f11e259f1faf29e090eeea853","tests/wasm/WeakSet.rs":"59c80b6ac0f60fe8499884ee4842b8a4f12039c6c29c58a329e85c187d42c94c","tests/wasm/WebAssembly.js":"5870c3811c8c17bab0b0e14c5ed62af987b8fa52382572a27cf704cded30f061","tests/wasm/WebAssembly.rs":"7d1ed7efb9fc8d052eea2c589a5f3e22f93933c67987b312bbf7eeac0a3afa43","tests/wasm/global_fns.rs":"34e12bfd548b8710297087920599d97e31971d142a8b0c4acb5712f71f1213d3","tests/wasm/main.rs":"e07b9a62897df33dba3d0962f403b19574d5cd99cd2e08e316be364c7a73d7e7"},"package":"c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a"} \ No newline at end of file diff --git a/vendor/js-sys/Cargo.toml b/vendor/js-sys/Cargo.toml index a94284810d8e066cc50a8f4d897ff7c07c40b315..2036a4c628d1d15f22613ab280421aae6ca3e44d 100644 --- a/vendor/js-sys/Cargo.toml +++ b/vendor/js-sys/Cargo.toml @@ -11,8 +11,9 @@ [package] edition = "2018" +rust-version = "1.56" name = "js-sys" -version = "0.3.63" +version = "0.3.64" authors = ["The wasm-bindgen Developers"] description = """ Bindings for all JS global objects and functions in all JS environments like @@ -31,16 +32,16 @@ test = false doctest = false [dependencies.wasm-bindgen] -version = "0.2.86" +version = "0.2.87" [target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-futures] -version = "0.4.36" +version = "0.4.37" [target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-test] -version = "=0.3.36" +version = "=0.3.37" [target."cfg(target_arch = \"wasm32\")".dev-dependencies.web-sys] -version = "0.3.63" +version = "0.3.64" features = [ "Headers", "Response", diff --git a/vendor/js-sys/src/lib.rs b/vendor/js-sys/src/lib.rs index ecbc11270b0043a04a3de2f75e5618f10f913352..576aec1f07868cbcb89e95300344700acadce6cd 100644 --- a/vendor/js-sys/src/lib.rs +++ b/vendor/js-sys/src/lib.rs @@ -610,6 +610,64 @@ extern "C" { pub fn unshift(this: &Array, value: &JsValue) -> u32; } +/// Iterator returned by `Array::into_iter` +#[derive(Debug, Clone)] +pub struct ArrayIntoIter { + range: std::ops::Range, + array: Array, +} + +impl std::iter::Iterator for ArrayIntoIter { + type Item = JsValue; + + fn next(&mut self) -> Option { + let index = self.range.next()?; + Some(self.array.get(index)) + } + + #[inline] + fn size_hint(&self) -> (usize, Option) { + self.range.size_hint() + } + + #[inline] + fn count(self) -> usize + where + Self: Sized, + { + self.range.count() + } + + #[inline] + fn last(self) -> Option + where + Self: Sized, + { + let Self { range, array } = self; + range.last().map(|index| array.get(index)) + } + + #[inline] + fn nth(&mut self, n: usize) -> Option { + self.range.nth(n).map(|index| self.array.get(index)) + } +} + +impl std::iter::DoubleEndedIterator for ArrayIntoIter { + fn next_back(&mut self) -> Option { + let index = self.range.next_back()?; + Some(self.array.get(index)) + } + + fn nth_back(&mut self, n: usize) -> Option { + self.range.nth_back(n).map(|index| self.array.get(index)) + } +} + +impl std::iter::FusedIterator for ArrayIntoIter {} + +impl std::iter::ExactSizeIterator for ArrayIntoIter {} + /// Iterator returned by `Array::iter` #[derive(Debug, Clone)] pub struct ArrayIter<'a> { @@ -629,6 +687,28 @@ impl<'a> std::iter::Iterator for ArrayIter<'a> { fn size_hint(&self) -> (usize, Option) { self.range.size_hint() } + + #[inline] + fn count(self) -> usize + where + Self: Sized, + { + self.range.count() + } + + #[inline] + fn last(self) -> Option + where + Self: Sized, + { + let Self { range, array } = self; + range.last().map(|index| array.get(index)) + } + + #[inline] + fn nth(&mut self, n: usize) -> Option { + self.range.nth(n).map(|index| self.array.get(index)) + } } impl<'a> std::iter::DoubleEndedIterator for ArrayIter<'a> { @@ -636,6 +716,10 @@ impl<'a> std::iter::DoubleEndedIterator for ArrayIter<'a> { let index = self.range.next_back()?; Some(self.array.get(index)) } + + fn nth_back(&mut self, n: usize) -> Option { + self.range.nth_back(n).map(|index| self.array.get(index)) + } } impl<'a> std::iter::FusedIterator for ArrayIter<'a> {} @@ -665,6 +749,18 @@ impl Array { } } +impl std::iter::IntoIterator for Array { + type Item = JsValue; + type IntoIter = ArrayIntoIter; + + fn into_iter(self) -> Self::IntoIter { + ArrayIntoIter { + range: 0..self.length(), + array: self, + } + } +} + // TODO pre-initialize the Array with the correct length using TrustedLen impl std::iter::FromIterator for Array where @@ -5053,9 +5149,9 @@ impl JsString { /// /// This method will call `char_code_at` for each code in this JS string, /// returning an iterator of the codes in sequence. - pub fn iter<'a>( - &'a self, - ) -> impl ExactSizeIterator + DoubleEndedIterator + 'a { + pub fn iter( + &self, + ) -> impl ExactSizeIterator + DoubleEndedIterator + '_ { (0..self.length()).map(move |i| self.char_code_at(i) as u16) } @@ -5091,6 +5187,7 @@ impl JsString { } impl PartialEq for JsString { + #[allow(clippy::cmp_owned)] // prevent infinite recursion fn eq(&self, other: &str) -> bool { String::from(self) == other } diff --git a/vendor/js-sys/tests/wasm/DataView.rs b/vendor/js-sys/tests/wasm/DataView.rs index 7747019a5c43802139251d84600fdd7fddc02a2b..e2014ca3ee2a21b089a3623fe6a71389f2e985fa 100644 --- a/vendor/js-sys/tests/wasm/DataView.rs +++ b/vendor/js-sys/tests/wasm/DataView.rs @@ -7,8 +7,7 @@ use wasm_bindgen_test::*; fn test() { let bytes = Int8Array::new(&JsValue::from(10)); - // TODO: figure out how to do `bytes[2] = 2` - bytes.subarray(2, 3).fill(2, 0, 1); + bytes.set_index(2, 2); let v = DataView::new(&bytes.buffer(), 2, 8); assert_eq!(v.byte_offset(), 2); @@ -63,18 +62,14 @@ fn test() { v.set_int8(0, 42); - // TODO: figure out how to do `bytes[2]` - bytes - .subarray(2, 3) - .for_each(&mut |x, _, _| assert_eq!(x, 42)); + assert_eq!(bytes.get_index(2), 42); } #[wasm_bindgen_test] fn dataview_inheritance() { let bytes = Int8Array::new(&JsValue::from(10)); - // TODO: figure out how to do `bytes[2] = 2` - bytes.subarray(2, 3).fill(2, 0, 1); + bytes.set_index(2, 2); let v = DataView::new(&bytes.buffer(), 2, 8); diff --git a/vendor/js-sys/tests/wasm/WebAssembly.rs b/vendor/js-sys/tests/wasm/WebAssembly.rs index 8a9b6ce18ce4686a38214102a45cfa9b2f6707ee..4a23654817508be9319f397f31c25bf88f27421c 100644 --- a/vendor/js-sys/tests/wasm/WebAssembly.rs +++ b/vendor/js-sys/tests/wasm/WebAssembly.rs @@ -2,7 +2,6 @@ use js_sys::*; use wasm_bindgen::prelude::*; use wasm_bindgen_futures::JsFuture; use wasm_bindgen_test::*; -use web_sys::{Headers, Response, ResponseInit}; #[wasm_bindgen(module = "tests/wasm/WebAssembly.js")] extern "C" { diff --git a/vendor/log/.cargo-checksum.json b/vendor/log/.cargo-checksum.json index 8945beda5ace2bce6391579e26156bec813689ad..31fa86e0a7019f724473f7dcd11a6ebc2868f45f 100644 --- a/vendor/log/.cargo-checksum.json +++ b/vendor/log/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"323f4950c38ffe8b113306156f11b612b51f00f8da5a5e7f4a61e36565f0ced8","Cargo.toml":"a72deeedc55bed74f8526fe72c750911403237904e67e917f908f9d5705e3a36","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"06708ec9d5847e2719e6db4cdb5c796f5c587aff274773081e2472bba9dc2272","benches/value.rs":"6ce7689c8c714c93fa58afa984aefe54f0fc279fdd69e1582d013c97d1688eba","build.rs":"5eaa13864535d5737189390f1fde6e7e5d4e3181d48cc56ee547fb52b2ab4be9","src/kv/error.rs":"5dea46a9eb2128442a60f7f8a0e0b9e5f155bc0e9ecc5134f91e466cb04c8a31","src/kv/key.rs":"941979c92db5f9b999b9eba4f96a8d43da034da80849fbfa65277f122b5fc39f","src/kv/mod.rs":"3592b750c206d5a36545d0c5f2e5db79c499c3f96dced13c5aeeacc7409b4ff6","src/kv/source.rs":"4fd7f0083caef44094984c02bd3d15d7e5fd6b95e809b2d6abab31aa8d01f5c3","src/kv/value.rs":"7f0ee0327dcfbb3df3ed4f0c8caed4bebd4b76bb7407f32f100d660f2a10eabd","src/lib.rs":"6067162f61da2db3577404d0f1aede105f11aa7718304b9f9c1f063c32620f84","src/macros.rs":"f44454d68bbe2d4b319cb3f7480de400d3999cc96cbf86d665ff63ac587ac8aa","src/serde.rs":"1f8614b42ffb1b34bdf58ce3ab6584b760a8a9e9aa6e00b27dc229cbc46f0a2b","triagebot.toml":"a135e10c777cd13459559bdf74fb704c1379af7c9b0f70bc49fa6f5a837daa81"},"package":"518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de"} \ No newline at end of file +{"files":{"CHANGELOG.md":"ec02b20ae6390252656b99ca3edf9f0ee457d44d2ada1e0ff5e0a4cbf0f809c3","Cargo.toml":"e9fb9f9514a722e4e49c56ed6e6b3a008de2cfc3c5439373226a01378c7ca444","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"e297502f3ff18aace3858ed44e7d7da1be3cad26cd63887013b8d958b216b671","benches/value.rs":"6ce7689c8c714c93fa58afa984aefe54f0fc279fdd69e1582d013c97d1688eba","src/kv/error.rs":"5dea46a9eb2128442a60f7f8a0e0b9e5f155bc0e9ecc5134f91e466cb04c8a31","src/kv/key.rs":"941979c92db5f9b999b9eba4f96a8d43da034da80849fbfa65277f122b5fc39f","src/kv/mod.rs":"3592b750c206d5a36545d0c5f2e5db79c499c3f96dced13c5aeeacc7409b4ff6","src/kv/source.rs":"4fd7f0083caef44094984c02bd3d15d7e5fd6b95e809b2d6abab31aa8d01f5c3","src/kv/value.rs":"7f0ee0327dcfbb3df3ed4f0c8caed4bebd4b76bb7407f32f100d660f2a10eabd","src/lib.rs":"039fdb0d37e00a10c1ea805b9c0a27b31cfb7a901f075ed77523193248706a1d","src/macros.rs":"f44454d68bbe2d4b319cb3f7480de400d3999cc96cbf86d665ff63ac587ac8aa","src/serde.rs":"1f8614b42ffb1b34bdf58ce3ab6584b760a8a9e9aa6e00b27dc229cbc46f0a2b","triagebot.toml":"a135e10c777cd13459559bdf74fb704c1379af7c9b0f70bc49fa6f5a837daa81"},"package":"b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"} \ No newline at end of file diff --git a/vendor/log/CHANGELOG.md b/vendor/log/CHANGELOG.md index a6f251b3fbc3195fc3f72cf6778ce224fc8a13f4..c45c875c13f3423753adc96b6cfe0be9b4e17328 100644 --- a/vendor/log/CHANGELOG.md +++ b/vendor/log/CHANGELOG.md @@ -2,6 +2,11 @@ ## [Unreleased] +## [0.4.19] - 2023-06-10 + +* Use target_has_atomic instead of the old atomic_cas cfg by @GuillaumeGomez in https://github.com/rust-lang/log/pull/555 +* Put MSRV into Cargo.toml by @est31 in https://github.com/rust-lang/log/pull/557 + ## [0.4.18] - 2023-05-28 * fix markdown links (again) by @hellow554 in https://github.com/rust-lang/log/pull/513 @@ -14,7 +19,6 @@ * GitHub Workflows security hardening by @sashashura in https://github.com/rust-lang/log/pull/538 * Fix build status badge by @atouchet in https://github.com/rust-lang/log/pull/539 * Add call_logger to the documentation by @a1ecbr0wn in https://github.com/rust-lang/log/pull/547 -* Remove build.rs file by @GuillaumeGomez in https://github.com/rust-lang/log/pull/543 * Use stable internals for key-value API by @KodrAus in https://github.com/rust-lang/log/pull/550 * Change wording of list of implementations by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/553 * Add std-logger to list of implementations by @Thomasdezeeuw in https://github.com/rust-lang/log/pull/554 @@ -239,7 +243,9 @@ version using log 0.4.x to avoid losing module and file information. Look at the [release tags] for information about older releases. -[Unreleased]: https://github.com/rust-lang-nursery/log/compare/0.4.17...HEAD +[Unreleased]: https://github.com/rust-lang-nursery/log/compare/0.4.18...HEAD +[0.4.19]: https://github.com/rust-lang-nursery/log/compare/0.4.18...0.4.19 +[0.4.18]: https://github.com/rust-lang-nursery/log/compare/0.4.17...0.4.18 [0.4.17]: https://github.com/rust-lang-nursery/log/compare/0.4.16...0.4.17 [0.4.16]: https://github.com/rust-lang-nursery/log/compare/0.4.15...0.4.16 [0.4.15]: https://github.com/rust-lang-nursery/log/compare/0.4.13...0.4.15 diff --git a/vendor/log/Cargo.toml b/vendor/log/Cargo.toml index e8023e2bf04ea3e7774031b48b5ffb8c688aad0c..b6da21d7adf9379b7daa36a3e4f8ca7d9296af2c 100644 --- a/vendor/log/Cargo.toml +++ b/vendor/log/Cargo.toml @@ -10,10 +10,10 @@ # See Cargo.toml.orig for the original contents. [package] +rust-version = "1.60.0" name = "log" -version = "0.4.18" +version = "0.4.19" authors = ["The Rust Project Developers"] -build = "build.rs" exclude = ["rfcs/**/*"] description = """ A lightweight logging facade for Rust diff --git a/vendor/log/README.md b/vendor/log/README.md index dcb271b05ea5c3cee54237f0095aa6ac0ed24f7e..c6a9447231139ae36aeb48aef4d8cbcba35f1423 100644 --- a/vendor/log/README.md +++ b/vendor/log/README.md @@ -69,6 +69,7 @@ There are many available implementations to choose from, here are some options: * [`flexi_logger`](https://docs.rs/flexi_logger/*/flexi_logger/) * [`call_logger`](https://docs.rs/call_logger/*/call_logger/) * [`std-logger`](https://docs.rs/std-logger/*/std_logger/) + * [`structured-logger`](https://docs.rs/structured-logger/latest/structured_logger/) * Complex configurable frameworks: * [`log4rs`](https://docs.rs/log4rs/*/log4rs/) * [`fern`](https://docs.rs/fern/*/fern/) diff --git a/vendor/log/build.rs b/vendor/log/build.rs deleted file mode 100644 index 11c26a3339fda13992cc5633d1f205f4cab5ec73..0000000000000000000000000000000000000000 --- a/vendor/log/build.rs +++ /dev/null @@ -1,46 +0,0 @@ -//! This build script detects target platforms that lack proper support for -//! atomics and sets `cfg` flags accordingly. - -use std::env; -use std::str; - -fn main() { - let target = match rustc_target() { - Some(target) => target, - None => return, - }; - - if target_has_atomic_cas(&target) { - println!("cargo:rustc-cfg=atomic_cas"); - } - - if target_has_atomics(&target) { - println!("cargo:rustc-cfg=has_atomics"); - } - - println!("cargo:rerun-if-changed=build.rs"); -} - -fn target_has_atomic_cas(target: &str) -> bool { - match target { - "thumbv6m-none-eabi" - | "msp430-none-elf" - | "riscv32i-unknown-none-elf" - | "riscv32imc-unknown-none-elf" => false, - _ => true, - } -} - -fn target_has_atomics(target: &str) -> bool { - match target { - "thumbv4t-none-eabi" - | "msp430-none-elf" - | "riscv32i-unknown-none-elf" - | "riscv32imc-unknown-none-elf" => false, - _ => true, - } -} - -fn rustc_target() -> Option { - env::var("TARGET").ok() -} diff --git a/vendor/log/src/lib.rs b/vendor/log/src/lib.rs index 4297344e041ed5ba4f131cb0b408ef3ad63b51c1..95f261d781465596818dfad430abbacde23f15ac 100644 --- a/vendor/log/src/lib.rs +++ b/vendor/log/src/lib.rs @@ -137,6 +137,7 @@ //! * [stderrlog] //! * [flexi_logger] //! * [call_logger] +//! * [structured-logger] //! * Complex configurable frameworks: //! * [log4rs] //! * [fern] @@ -313,11 +314,12 @@ //! [win_dbg_logger]: https://docs.rs/win_dbg_logger/*/win_dbg_logger/ //! [db_logger]: https://docs.rs/db_logger/*/db_logger/ //! [console_log]: https://docs.rs/console_log/*/console_log/ +//! [structured-logger]: https://docs.rs/structured-logger/latest/structured_logger/ #![doc( html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://www.rust-lang.org/favicon.ico", - html_root_url = "https://docs.rs/log/0.4.18" + html_root_url = "https://docs.rs/log/0.4.19" )] #![warn(missing_docs)] #![deny(missing_debug_implementations, unconditional_recursion)] @@ -344,20 +346,20 @@ mod serde; #[cfg(feature = "kv_unstable")] pub mod kv; -#[cfg(has_atomics)] +#[cfg(target_has_atomic = "ptr")] use std::sync::atomic::{AtomicUsize, Ordering}; -#[cfg(not(has_atomics))] +#[cfg(not(target_has_atomic = "ptr"))] use std::cell::Cell; -#[cfg(not(has_atomics))] +#[cfg(not(target_has_atomic = "ptr"))] use std::sync::atomic::Ordering; -#[cfg(not(has_atomics))] +#[cfg(not(target_has_atomic = "ptr"))] struct AtomicUsize { v: Cell, } -#[cfg(not(has_atomics))] +#[cfg(not(target_has_atomic = "ptr"))] impl AtomicUsize { const fn new(v: usize) -> AtomicUsize { AtomicUsize { v: Cell::new(v) } @@ -371,7 +373,7 @@ impl AtomicUsize { self.v.set(val) } - #[cfg(atomic_cas)] + #[cfg(target_has_atomic = "ptr")] fn compare_exchange( &self, current: usize, @@ -389,7 +391,7 @@ impl AtomicUsize { // Any platform without atomics is unlikely to have multiple cores, so // writing via Cell will not be a race condition. -#[cfg(not(has_atomics))] +#[cfg(not(target_has_atomic = "ptr"))] unsafe impl Sync for AtomicUsize {} // The LOGGER static holds a pointer to the global logger. It is protected by @@ -1217,6 +1219,7 @@ where /// /// Note that `Trace` is the maximum level, because it provides the maximum amount of detail in the emitted logs. #[inline] +#[cfg(target_has_atomic = "ptr")] pub fn set_max_level(level: LevelFilter) { MAX_LOG_LEVEL_FILTER.store(level as usize, Ordering::Relaxed); } @@ -1285,7 +1288,7 @@ pub fn max_level() -> LevelFilter { /// An error is returned if a logger has already been set. /// /// [`set_logger`]: fn.set_logger.html -#[cfg(all(feature = "std", atomic_cas))] +#[cfg(all(feature = "std", target_has_atomic = "ptr"))] pub fn set_boxed_logger(logger: Box) -> Result<(), SetLoggerError> { set_logger_inner(|| Box::leak(logger)) } @@ -1343,12 +1346,12 @@ pub fn set_boxed_logger(logger: Box) -> Result<(), SetLoggerError> { /// ``` /// /// [`set_logger_racy`]: fn.set_logger_racy.html -#[cfg(atomic_cas)] +#[cfg(target_has_atomic = "ptr")] pub fn set_logger(logger: &'static dyn Log) -> Result<(), SetLoggerError> { set_logger_inner(|| logger) } -#[cfg(atomic_cas)] +#[cfg(target_has_atomic = "ptr")] fn set_logger_inner(make_logger: F) -> Result<(), SetLoggerError> where F: FnOnce() -> &'static dyn Log, diff --git a/vendor/wasm-bindgen-backend/.cargo-checksum.json b/vendor/wasm-bindgen-backend/.cargo-checksum.json index d8c2b5c44d5ac1d4c5de0da11cccb65b670d17cc..f6dcacd922b6c88453e1725db54f986b01e4a5ac 100644 --- a/vendor/wasm-bindgen-backend/.cargo-checksum.json +++ b/vendor/wasm-bindgen-backend/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"79b2ef0ec952175616b69eac4aa314d8c2867ed609cec29f845ce8d4f0942616","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","src/ast.rs":"ec223a37197bbb92ed5adf3cbae359a5e60ccf3414976b8f98e22bb77ce2f440","src/codegen.rs":"c5a9778ec77f9ba99c9d74a7ad5002934a120b577c30b3435798cc4e4db78311","src/encode.rs":"c8b2676929abb4bc2ec58c58b2a3033cc2f486de831f026b2c699e371b8d5f0b","src/error.rs":"ecb3e0a2abdce0c9c5bb8a68c0e001a328ed85608bcf4ccb9215088d1f81a9c2","src/lib.rs":"14ade320b537315ec4c575f9f3c7a35ff4e9385114c4c26a35b2ee270a897cb4","src/util.rs":"0e6705dcd8836e01d520e229edc6dbe375ec01ea39e410bd743395416b807f7c"},"package":"19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb"} \ No newline at end of file +{"files":{"Cargo.toml":"c740e4f5745411a6dbca5e83747101fb23d2ed90bad92153458c5ba8d6d24585","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","src/ast.rs":"880a7260126a5d77ba1ad748b199c9a2ff2da806a8f849e1160495f5d2d62203","src/codegen.rs":"e61dbe3f95059afd3e43b252aaf6ceef399b32a4a43a855ab3edb323281e78e7","src/encode.rs":"1350ccc927d7afdc1379a41127ce890dd50350a7773660b73f37d505a6229c16","src/error.rs":"18e23656cf81d363dae25b6340a725b8135badd91a2702a83cd80e19821e99ba","src/lib.rs":"14ade320b537315ec4c575f9f3c7a35ff4e9385114c4c26a35b2ee270a897cb4","src/util.rs":"7f305ad4c71e9d11ac9c5e9ab452d3c885dcfe8141084411892f042ccc54ba5e"},"package":"5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd"} \ No newline at end of file diff --git a/vendor/wasm-bindgen-backend/Cargo.toml b/vendor/wasm-bindgen-backend/Cargo.toml index f72cc7e84d53add1f4ead9dcdf6e4969d0344d22..3a984670ede0eee704e36eb1d74c0d58a3871e1a 100644 --- a/vendor/wasm-bindgen-backend/Cargo.toml +++ b/vendor/wasm-bindgen-backend/Cargo.toml @@ -11,8 +11,9 @@ [package] edition = "2018" +rust-version = "1.56" name = "wasm-bindgen-backend" -version = "0.2.86" +version = "0.2.87" authors = ["The wasm-bindgen Developers"] description = """ Backend code generation of the wasm-bindgen tool @@ -43,7 +44,7 @@ version = "2.0" features = ["full"] [dependencies.wasm-bindgen-shared] -version = "=0.2.86" +version = "=0.2.87" [features] extra-traits = ["syn/extra-traits"] diff --git a/vendor/wasm-bindgen-backend/src/ast.rs b/vendor/wasm-bindgen-backend/src/ast.rs index 9b37cf16532c33ed5ce89fb981eab78faf582815..9cd8ebec14094a84a2fd64b3626dc8682da53e28 100644 --- a/vendor/wasm-bindgen-backend/src/ast.rs +++ b/vendor/wasm-bindgen-backend/src/ast.rs @@ -74,6 +74,8 @@ impl Program { /// In contrast to Program, LinkToModule must expand to an expression. /// linked_modules of the inner Program must contain exactly one element /// whose link is produced by the expression. +#[cfg_attr(feature = "extra-traits", derive(Debug))] +#[derive(Clone)] pub struct LinkToModule(pub Program); /// A rust to js interface. Allows interaction with rust objects/functions @@ -349,7 +351,7 @@ pub struct Function { } /// Information about a Struct being exported -#[cfg_attr(feature = "extra-traits", derive(Debug, PartialEq, Eq))] +#[cfg_attr(feature = "extra-traits", derive(Debug))] #[derive(Clone)] pub struct Struct { /// The name of the struct in Rust code @@ -369,7 +371,7 @@ pub struct Struct { } /// The field of a struct -#[cfg_attr(feature = "extra-traits", derive(Debug, PartialEq, Eq))] +#[cfg_attr(feature = "extra-traits", derive(Debug))] #[derive(Clone)] pub struct StructField { /// The name of the field in Rust code @@ -464,10 +466,10 @@ impl Export { pub(crate) fn rust_symbol(&self) -> Ident { let mut generated_name = String::from("__wasm_bindgen_generated"); if let Some(class) = &self.js_class { - generated_name.push_str("_"); + generated_name.push('_'); generated_name.push_str(class); } - generated_name.push_str("_"); + generated_name.push('_'); generated_name.push_str(&self.function.name.to_string()); Ident::new(&generated_name, Span::call_site()) } diff --git a/vendor/wasm-bindgen-backend/src/codegen.rs b/vendor/wasm-bindgen-backend/src/codegen.rs index c3f3bf7d8ecd2e1c3fed516947f80dd3def5f0d5..a43fbf9405ee899bb803430891fdf8ed1efcea82 100644 --- a/vendor/wasm-bindgen-backend/src/codegen.rs +++ b/vendor/wasm-bindgen-backend/src/codegen.rs @@ -348,7 +348,7 @@ impl ToTokens for ast::StructField { .to_tokens(tokens); Descriptor { - ident: &getter, + ident: getter, inner: quote! { <#ty as WasmDescribe>::describe(); }, @@ -1276,7 +1276,7 @@ impl<'a> ToTokens for DescribeImport<'a> { #inform_ret }, attrs: f.function.rust_attrs.clone(), - wasm_bindgen: &self.wasm_bindgen, + wasm_bindgen: self.wasm_bindgen, } .to_tokens(tokens); } @@ -1377,7 +1377,7 @@ impl ToTokens for ast::ImportStatic { .to_tokens(into); Descriptor { - ident: &shim_name, + ident: shim_name, inner: quote! { <#ty as WasmDescribe>::describe(); }, diff --git a/vendor/wasm-bindgen-backend/src/encode.rs b/vendor/wasm-bindgen-backend/src/encode.rs index e89cae7c0fff12ac7b289c7be4d982130bf42355..e7c7624e0ea9e8ea6b1afe1840d5849250f1428f 100644 --- a/vendor/wasm-bindgen-backend/src/encode.rs +++ b/vendor/wasm-bindgen-backend/src/encode.rs @@ -83,8 +83,8 @@ impl Interner { return Ok(ImportModule::Named(self.intern_str(&file.new_identifier))); } self.check_for_package_json(); - let path = if id.starts_with("/") { - self.root.join(&id[1..]) + let path = if let Some(id) = id.strip_prefix('/') { + self.root.join(id) } else if id.starts_with("./") || id.starts_with("../") { let msg = "relative module paths aren't supported yet"; return Err(Diagnostic::span_error(span, msg)); @@ -144,7 +144,7 @@ fn shared_program<'a>( typescript_custom_sections: prog .typescript_custom_sections .iter() - .map(|x| -> &'a str { &x }) + .map(|x| -> &'a str { x }) .collect(), linked_modules: prog .linked_modules @@ -186,13 +186,10 @@ fn shared_export<'a>( export: &'a ast::Export, intern: &'a Interner, ) -> Result, Diagnostic> { - let consumed = match export.method_self { - Some(ast::MethodSelf::ByValue) => true, - _ => false, - }; + let consumed = matches!(export.method_self, Some(ast::MethodSelf::ByValue)); let method_kind = from_ast_method_kind(&export.function, intern, &export.method_kind)?; Ok(Export { - class: export.js_class.as_ref().map(|s| &**s), + class: export.js_class.as_deref(), comments: export.comments.iter().map(|s| &**s).collect(), consumed, function: shared_function(&export.function, intern), @@ -410,7 +407,7 @@ impl Encode for usize { impl<'a> Encode for &'a [u8] { fn encode(&self, dst: &mut Encoder) { self.len().encode(dst); - dst.dst.extend_from_slice(*self); + dst.dst.extend_from_slice(self); } } @@ -420,7 +417,7 @@ impl<'a> Encode for &'a str { } } -impl<'a> Encode for String { +impl Encode for String { fn encode(&self, dst: &mut Encoder) { self.as_bytes().encode(dst); } diff --git a/vendor/wasm-bindgen-backend/src/error.rs b/vendor/wasm-bindgen-backend/src/error.rs index 3e65cd745ccd78f8f48fcae3b3e3b68c7dd4639c..19d991b3ce4be37150d9290725572511c650b12d 100644 --- a/vendor/wasm-bindgen-backend/src/error.rs +++ b/vendor/wasm-bindgen-backend/src/error.rs @@ -70,7 +70,7 @@ impl Diagnostic { /// Attempt to generate a `Diagnostic` from a vector of other `Diagnostic` instances. /// If the `Vec` is empty, returns `Ok(())`, otherwise returns the new `Diagnostic` pub fn from_vec(diagnostics: Vec) -> Result<(), Diagnostic> { - if diagnostics.len() == 0 { + if diagnostics.is_empty() { Ok(()) } else { Err(Diagnostic { diff --git a/vendor/wasm-bindgen-backend/src/util.rs b/vendor/wasm-bindgen-backend/src/util.rs index 1a2b07dce380d3a5f778cdae6b7e98b74f8e32db..8424e602a0827a804f6565eb1467cb7dbc916d3a 100644 --- a/vendor/wasm-bindgen-backend/src/util.rs +++ b/vendor/wasm-bindgen-backend/src/util.rs @@ -14,22 +14,22 @@ use crate::ast; use proc_macro2::{self, Ident}; /// Check whether a given `&str` is a Rust keyword +#[rustfmt::skip] fn is_rust_keyword(name: &str) -> bool { - match name { + matches!(name, "abstract" | "alignof" | "as" | "become" | "box" | "break" | "const" | "continue" | "crate" | "do" | "else" | "enum" | "extern" | "false" | "final" | "fn" | "for" | "if" | "impl" | "in" | "let" | "loop" | "macro" | "match" | "mod" | "move" | "mut" | "offsetof" | "override" | "priv" | "proc" | "pub" | "pure" | "ref" | "return" | "Self" | "self" | "sizeof" | "static" | "struct" | "super" | "trait" | "true" | "type" | "typeof" | "unsafe" | "unsized" | "use" | "virtual" | "where" | "while" - | "yield" | "bool" | "_" => true, - _ => false, - } + | "yield" | "bool" | "_" + ) } /// Create an `Ident`, possibly mangling it if it conflicts with a Rust keyword. pub fn rust_ident(name: &str) -> Ident { - if name == "" { + if name.is_empty() { panic!("tried to create empty Ident (from \"\")"); } else if is_rust_keyword(name) { Ident::new(&format!("{}_", name), proc_macro2::Span::call_site()) diff --git a/vendor/wasm-bindgen-macro-support/.cargo-checksum.json b/vendor/wasm-bindgen-macro-support/.cargo-checksum.json index 578e7be7f05d0a44c36e66176028ba44c9b6a36e..dcec33906cc35a9e360d681826cf77bacb55faab 100644 --- a/vendor/wasm-bindgen-macro-support/.cargo-checksum.json +++ b/vendor/wasm-bindgen-macro-support/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"2c7bb5ad73be2cf4b5a2958a46b526b377c9607d3f95020832384368f5a633a7","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","src/lib.rs":"5d2106dbed72f4df2f196188229c74feac5b9b1c090980bcb48276e81ca30084","src/parser.rs":"ca2deecd6b2c04a44cdad5bf1644c34713054781be08fd98697849f983380448"},"package":"e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8"} \ No newline at end of file +{"files":{"Cargo.toml":"928cbdb77324e101e405dc8f019f9f5dab5462b3f67b15d321530b96ae4a16f7","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","src/lib.rs":"4f212183a9d5a2682d6156f7b011f789fa23002099268940af090336f067d6fa","src/parser.rs":"e230634a3c26d1c6c3a2622cf028321a516cfcfabfe8aa17f4d563d6ec15f13e"},"package":"54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"} \ No newline at end of file diff --git a/vendor/wasm-bindgen-macro-support/Cargo.toml b/vendor/wasm-bindgen-macro-support/Cargo.toml index 0aca1dfe354285f462964aa82894567a331007b5..36bb02447724a8fab41d243b788ed1fc40c83636 100644 --- a/vendor/wasm-bindgen-macro-support/Cargo.toml +++ b/vendor/wasm-bindgen-macro-support/Cargo.toml @@ -11,8 +11,9 @@ [package] edition = "2018" +rust-version = "1.56" name = "wasm-bindgen-macro-support" -version = "0.2.86" +version = "0.2.87" authors = ["The wasm-bindgen Developers"] description = """ The part of the implementation of the `#[wasm_bindgen]` attribute that is not in the shared backend crate @@ -37,10 +38,10 @@ features = [ ] [dependencies.wasm-bindgen-backend] -version = "=0.2.86" +version = "=0.2.87" [dependencies.wasm-bindgen-shared] -version = "=0.2.86" +version = "=0.2.87" [features] extra-traits = ["syn/extra-traits"] diff --git a/vendor/wasm-bindgen-macro-support/src/lib.rs b/vendor/wasm-bindgen-macro-support/src/lib.rs index f44faa6ba7a20d47929afad24edb2e125b763a94..21d66305c384d68219071b85d4cfb703a4986c14 100644 --- a/vendor/wasm-bindgen-macro-support/src/lib.rs +++ b/vendor/wasm-bindgen-macro-support/src/lib.rs @@ -76,10 +76,11 @@ pub fn expand_class_marker( // We manually implement `ToTokens for ImplItemFn` here, injecting our // program's tokens before the actual method's inner body tokens. let mut tokens = proc_macro2::TokenStream::new(); - tokens.append_all(item.attrs.iter().filter(|attr| match attr.style { - syn::AttrStyle::Outer => true, - _ => false, - })); + tokens.append_all( + item.attrs + .iter() + .filter(|attr| matches!(attr.style, syn::AttrStyle::Outer)), + ); item.vis.to_tokens(&mut tokens); item.sig.to_tokens(&mut tokens); let mut err = None; @@ -88,10 +89,11 @@ pub fn expand_class_marker( err = Some(e); } parser::check_unused_attrs(tokens); // same as above - tokens.append_all(item.attrs.iter().filter(|attr| match attr.style { - syn::AttrStyle::Inner(_) => true, - _ => false, - })); + tokens.append_all( + item.attrs + .iter() + .filter(|attr| matches!(attr.style, syn::AttrStyle::Inner(_))), + ); tokens.append_all(&item.block.stmts); }); diff --git a/vendor/wasm-bindgen-macro-support/src/parser.rs b/vendor/wasm-bindgen-macro-support/src/parser.rs index 791f1ca1ea28683881fabd8eca923be5706fdfa1..9765cddd74cc385089eb0db70ea9d9949efe7d6e 100644 --- a/vendor/wasm-bindgen-macro-support/src/parser.rs +++ b/vendor/wasm-bindgen-macro-support/src/parser.rs @@ -210,7 +210,7 @@ impl BindgenAttrs { let pos = attrs .iter() .enumerate() - .find(|&(_, ref m)| m.path().segments[0].ident == "wasm_bindgen") + .find(|&(_, m)| m.path().segments[0].ident == "wasm_bindgen") .map(|a| a.0); let pos = match pos { Some(i) => i, @@ -229,7 +229,7 @@ impl BindgenAttrs { } }; let mut attrs: BindgenAttrs = syn::parse2(tokens)?; - ret.attrs.extend(attrs.attrs.drain(..)); + ret.attrs.append(&mut attrs.attrs); attrs.check_used(); } } @@ -365,11 +365,11 @@ impl Parse for BindgenAttr { attrgen!(parsers); - return Err(original.error(if attr_string.starts_with("_") { + Err(original.error(if attr_string.starts_with('_') { "unknown attribute: it's safe to remove unused attributes entirely." } else { "unknown attribute" - })); + })) } } @@ -404,7 +404,7 @@ impl<'a> ConvertToAst<(&ast::Program, BindgenAttrs)> for &'a mut syn::ItemStruct self, (program, attrs): (&ast::Program, BindgenAttrs), ) -> Result { - if self.generics.params.len() > 0 { + if !self.generics.params.is_empty() { bail_span!( self.generics, "structs with #[wasm_bindgen] cannot have lifetime or \ @@ -597,7 +597,7 @@ impl<'a> ConvertToAst<(&ast::Program, BindgenAttrs, &'a Option ConvertToAst<(&ast::Program, BindgenAttrs, &'a Option 0 { + if !sig.generics.params.is_empty() { bail_span!( sig.generics, "can't #[wasm_bindgen] functions with lifetime or type parameters", @@ -968,11 +968,8 @@ impl<'a> MacroParse<(Option, &'a mut TokenStream)> for syn::Item { .iter() .enumerate() .find(|(_, m)| m.path().is_ident("no_mangle")); - match no_mangle { - Some((i, _)) => { - f.attrs.remove(i); - } - _ => {} + if let Some((i, _)) = no_mangle { + f.attrs.remove(i); } let comments = extract_doc_comments(&f.attrs); // If the function isn't used for anything other than being exported to JS, @@ -981,10 +978,10 @@ impl<'a> MacroParse<(Option, &'a mut TokenStream)> for syn::Item { tokens.extend(quote::quote! { #[allow(dead_code)] }); f.to_tokens(tokens); if opts.start().is_some() { - if f.sig.generics.params.len() > 0 { + if !f.sig.generics.params.is_empty() { bail_span!(&f.sig.generics, "the start function cannot have generics",); } - if f.sig.inputs.len() > 0 { + if !f.sig.inputs.is_empty() { bail_span!(&f.sig.inputs, "the start function cannot have arguments",); } } @@ -1068,7 +1065,7 @@ impl<'a> MacroParse for &'a mut syn::ItemImpl { if let Some((_, path, _)) = &self.trait_ { bail_span!(path, "#[wasm_bindgen] trait impls are not supported"); } - if self.generics.params.len() > 0 { + if !self.generics.params.is_empty() { bail_span!( self.generics, "#[wasm_bindgen] generic impls aren't supported" @@ -1086,7 +1083,7 @@ impl<'a> MacroParse for &'a mut syn::ItemImpl { }; let mut errors = Vec::new(); for item in self.items.iter_mut() { - if let Err(e) = prepare_for_impl_recursion(item, &name, program, &opts) { + if let Err(e) = prepare_for_impl_recursion(item, name, program, &opts) { errors.push(e); } } @@ -1272,22 +1269,20 @@ impl<'a> MacroParse<(&'a mut TokenStream, BindgenAttrs)> for syn::ItemEnum { program: &mut ast::Program, (tokens, opts): (&'a mut TokenStream, BindgenAttrs), ) -> Result<(), Diagnostic> { - if self.variants.len() == 0 { + if self.variants.is_empty() { bail_span!(self, "cannot export empty enums to JS"); } let generate_typescript = opts.skip_typescript().is_none(); // Check if the first value is a string literal if let Some((_, expr)) = &self.variants[0].discriminant { - match get_expr(expr) { - syn::Expr::Lit(syn::ExprLit { - attrs: _, - lit: syn::Lit::Str(_), - }) => { - opts.check_used(); - return import_enum(self, program); - } - _ => {} + if let syn::Expr::Lit(syn::ExprLit { + lit: syn::Lit::Str(_), + .. + }) = get_expr(expr) + { + opts.check_used(); + return import_enum(self, program); } } let js_name = opts @@ -1533,7 +1528,7 @@ fn extract_first_ty_param(ty: Option<&syn::Type>) -> Result, D Some(t) => t, None => return Ok(None), }; - let path = match *get_ty(&t) { + let path = match *get_ty(t) { syn::Type::Path(syn::TypePath { qself: None, ref path, @@ -1556,8 +1551,8 @@ fn extract_first_ty_param(ty: Option<&syn::Type>) -> Result, D syn::GenericArgument::Type(t) => t, other => bail_span!(other, "must be a type parameter"), }; - match get_ty(&ty) { - syn::Type::Tuple(t) if t.elems.len() == 0 => return Ok(None), + match get_ty(ty) { + syn::Type::Tuple(t) if t.elems.is_empty() => return Ok(None), _ => {} } Ok(Some(ty.clone())) @@ -1570,11 +1565,7 @@ fn extract_doc_comments(attrs: &[syn::Attribute]) -> Vec { .filter_map(|a| { // if the path segments include an ident of "doc" we know this // this is a doc comment - if a.path() - .segments - .iter() - .any(|s| s.ident.to_string() == "doc") - { + if a.path().segments.iter().any(|s| s.ident == "doc") { let tokens = match &a.meta { syn::Meta::Path(_) => None, syn::Meta::List(list) => Some(list.tokens.clone()), @@ -1586,7 +1577,7 @@ fn extract_doc_comments(attrs: &[syn::Attribute]) -> Vec { tokens.into_iter().flatten().filter_map(|t| match t { TokenTree::Literal(lit) => { let quoted = lit.to_string(); - Some(try_unescape("ed).unwrap_or_else(|| quoted)) + Some(try_unescape("ed).unwrap_or(quoted)) } _ => None, }), @@ -1656,7 +1647,7 @@ fn assert_no_lifetimes(sig: &syn::Signature) -> Result<(), Diagnostic> { impl<'ast> syn::visit::Visit<'ast> for Walk { fn visit_lifetime(&mut self, i: &'ast syn::Lifetime) { self.diagnostics.push(err_span!( - &*i, + i, "it is currently not sound to use lifetimes in function \ signatures" )); @@ -1735,7 +1726,7 @@ pub fn link_to(opts: BindgenAttrs) -> Result { Diagnostic::span_error(Span::call_site(), "`link_to!` requires a module.") })?; if let ast::ImportModule::Named(p, s) | ast::ImportModule::RawNamed(p, s) = &module { - if !p.starts_with("./") && !p.starts_with("../") && !p.starts_with("/") { + if !p.starts_with("./") && !p.starts_with("../") && !p.starts_with('/') { return Err(Diagnostic::span_error( *s, "`link_to!` does not support module paths.", diff --git a/vendor/wasm-bindgen-macro/.cargo-checksum.json b/vendor/wasm-bindgen-macro/.cargo-checksum.json index 0520ef50993a360c6971b60e74bbb9d55e92d160..5c19e213b951bf30a203c8e4c0bc59d0b3bcb67d 100644 --- a/vendor/wasm-bindgen-macro/.cargo-checksum.json +++ b/vendor/wasm-bindgen-macro/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"47b894b68c528c579e8ce731de392af5f5a39b0083acad0796404c94f2803d90","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"ef5ffff199bf75993b81c3c1de8dbe19babb22b89170763323fa11a85c62f045","src/lib.rs":"8ba70e362eeb15efaf686df366c3525c24272d61141e31585e1f642b030a54c9","src/worker.js":"cb5c33dd41cfad622abce5464a3ceae478904ea16ddc3c6c769ee33e0c086692","tests/ui.rs":"aed1b0f4e8c99b06657c54f3a74de4b3535ce567fb20e4d2fc6911b361c3d934","ui-tests/async-errors.rs":"f3ab249b3741b38c6213651a5cd36f8b9873bad34bd49d13b780d21bed47272b","ui-tests/async-errors.stderr":"5000b1fa11677c0c4224349e051c653e6ceab6f9b304d32fa3dec2def7269d00","ui-tests/attribute-fails-to-parse.rs":"c21c2a250534ca7e80fc462804efc0db8a71b6b0cdb0c57c5cab444d081f68de","ui-tests/attribute-fails-to-parse.stderr":"3bc77befbbe7e2d0744dd81067a75cb70c3f2d8bd9c60ec5bcb2dfb65fc1a593","ui-tests/bad-signatures.rs":"96b53e9327cc75747510b548b97cff86429532d5cdf65cc991211bca5646abc2","ui-tests/bad-signatures.stderr":"931e934ccbc43e4cee41a46ecaa3953c3ccdef69450519a838b9af428f75fa72","ui-tests/import-local.rs":"783ef9ebb792111ec7fd335cbc4f684381609c86c0af660fd5ab35cf04cacbf4","ui-tests/import-local.stderr":"6e90ad05c3783d7c69ff4e156458c63ee45ceb7ea8ebc38e1ca52e7f46e8bcf8","ui-tests/invalid-attr.rs":"603cf0bcb95a42a35e535a7d9577dc8c5e6175af4cd27d83fdf77cd6b67acf48","ui-tests/invalid-attr.stderr":"e1fd9450e16f1d672cb708bcbaf99a07f916c48d3e961c1dd1e92bd835d3ec53","ui-tests/invalid-enums.rs":"bf473e1bbafbcde82c946311e824d97bd1f941cfc5c1495025d8a7a513b90a19","ui-tests/invalid-enums.stderr":"ecd549ab69e7d7d645922857e2a83b7171f97a276afeb9f113407a4181b2b9e2","ui-tests/invalid-imports.rs":"94724ba9f08fde1830d82b332aa1833850018d8738daefda3fe2516190b6842f","ui-tests/invalid-imports.stderr":"21c96f9bb3b9d0951161b05ad413739ab436242a107e4fe0f9b029b9fa4b061e","ui-tests/invalid-items.rs":"ca919f7fe6c0d9fd4218ec43c85d7b43f478ed3042959479eb42adc23f4edf02","ui-tests/invalid-items.stderr":"a7392f1b918cac6eda3cefa5244dc555e4b6332836cab0bbd341b992672cd064","ui-tests/invalid-methods.rs":"c463bee9962d936ef2aeb4051ebc5558c0b7fefe6e459f3a325482763746969f","ui-tests/invalid-methods.stderr":"ca21b68621674208b7f95b4a201b9726e4bc07ffa127140dc13656d68db2e2e2","ui-tests/invalid-setter.rs":"db9666df889b58246a51ebc7d753e41ac4382475257a589499a4e886e6fbc45f","ui-tests/invalid-setter.stderr":"d1629836ec39727bfa4737538e9f991cda6fbaeb1c0f8c878cb13757e66daac5","ui-tests/link-to.rs":"be7003f80bf05cffa1301d049bd8f3792513a3f3922da3e74f4b58086970bb85","ui-tests/link-to.stderr":"c582600658db54acf3c16ffde723320a4cbcca3514cc30659badb524a06f66e7","ui-tests/main-async.rs":"0d9aedf6158295d9b4c9ed391f979073c1e294c0be8cdd310444d941826b02bb","ui-tests/main-async.stderr":"ef9b711e9db3bbc3d0cbc315044eb6f72139bea4b1785b12f33d521e280d5056","ui-tests/main-debug.rs":"b9fa920c4fc28b0815aed752b90e77723c3291670b6e35372d9d2b05a1ac19eb","ui-tests/main-debug.stderr":"67f5ccb2df878c02a3b394273ccf531fad68f289712140956186c0e9fd83f8f3","ui-tests/main-infallible.rs":"a75d80b13fed301181d69bb6f67ad082c3f1976ec9effef17aadb31bb1160f2a","ui-tests/main-infallible.stderr":"11629a59febd8874c1a87791f82e43cfefc9e10d7c5352f322c80293518b8f47","ui-tests/main-jsvalue.rs":"5f9be90d6603c836aa7eaba0a6014975b6974e895602f4171f5631bf937a4278","ui-tests/main-jsvalue.stderr":"9d6989822f1656100be44f5a99f3a6c0d8127fbd0d47b7a34f2c8806aa957f3d","ui-tests/main-unit.rs":"88c746ad86b282c0da5271a335126396db6701b963d7db3286271edfd5b0a503","ui-tests/main-unit.stderr":"5ca86669158c9bff919785ad330745ed80d38e3ff8d1d32c3ff47752fcec8196","ui-tests/main.rs":"0dbbca3882dcec75e1137e6043fd053d8c8cc6a17276ee1dc9088cfaaf565e88","ui-tests/main.stderr":"dd04c49d88dab17ffa0add6603b81407b7f4f43cef63c1afc19bcf0e25a11128","ui-tests/missing-catch.rs":"705bf784db641b30131510b5c47192014e19aeeeb6f73ede1d5356ad2c29915c","ui-tests/missing-catch.stderr":"e8e0f31e0be84a9a932ec899eae358c3b448732d4c1962461d0d321ddd0d7055","ui-tests/non-public-function.rs":"0fe075b32c211870bcde0f7dce0eceaffb61a4f8a6ffbd90946a59d7d220343c","ui-tests/non-public-function.stderr":"c9f6f5123b6c3462b8952d6e468ed13c566635d4939b98c9098d2a713f5aa2df","ui-tests/pub-not-copy.rs":"1e50f0b63a6e6363b0926cf947b0492a9803ddb35370f32e733a32506df9b556","ui-tests/pub-not-copy.stderr":"1090980d08622552b82c13da82b4c26ce309314b6062f0c5443a65eff5255d00","ui-tests/start-function.rs":"a56f1309182e597370555c18aa31e240e70e82585d6e72ab4c42e2229a8c1a53","ui-tests/start-function.stderr":"b93aeac4cb81cb2d03cfe6d7952e1a3a2568cb719e199df5292c2210058c9219","ui-tests/struct-fields.rs":"8e70ca9716e4432a014a279cf2714aa4e15d2d9dfb198ad93f2fe9b6037ff8c4","ui-tests/struct-fields.stderr":"f1cd67f6c12de58b3cda3642f0ba199ab634ec0fe280d5d98d0b6306cbd00475","ui-tests/structural-and-final.rs":"1571b078a9d0be6c96ab97be10f1bf369dbb740f04fa312834f49a64130f8d30","ui-tests/structural-and-final.stderr":"cf21dec2851d3f667b93a317ba9e4657a623c49e8b779ea64669452297ba0a17","ui-tests/traits-not-implemented.rs":"3445e15b9c61f84a1f8d703a3a4fe2d2e2d85960ff6b2ac718644d97bf1564e1","ui-tests/traits-not-implemented.stderr":"73a585b5cbc646289d830c8bd696869f0ea643ac24f3eeddaadbb711490b7934","ui-tests/unknown-type-in-import.rs":"7fbc95bb82d0d60568b8daf27236418219c57447d1dc2e2e384e5f907bac3e3e","ui-tests/unknown-type-in-import.stderr":"348350a2591544623f96246d860b47c64ef43933b8ac447ec7ff6fab7bac00c0","ui-tests/unused-attributes.rs":"7c20441c30e53376c9e72fcf82da0cc6e7462eec3087f9eb74f9682eaf7fb3e6","ui-tests/unused-attributes.stderr":"461a3724155d6007e75191233d0ff9a4897eeaed04f2ab8582636f17e62f46ac","ui-tests/update-all-references.sh":"8b8dbf31e7ada1314956db7a20ab14b13af3ae246a6295afdc7dc96af8ec3773","ui-tests/update-references.sh":"65375c25981646e08e8589449a06be4505b1a2c9e10d35f650be4b1b495dff22","ui-tests/wasm-bindgen.rs":"49ba1dc3f1847d564afb472ff965e1bf00398e660771b2481bd65515f28439ab","ui-tests/wasm-bindgen.stderr":"32bb74ff13adb4361d75be7deef95e0158f53b0449ae73cd67cc82ff0d7a83a2"},"package":"14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258"} \ No newline at end of file +{"files":{"Cargo.toml":"a795edb195ad34f5c56a6254007c8a4292890c7feb94a2d57f1efb5eb80cbdce","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"ef5ffff199bf75993b81c3c1de8dbe19babb22b89170763323fa11a85c62f045","src/lib.rs":"8ba70e362eeb15efaf686df366c3525c24272d61141e31585e1f642b030a54c9","src/worker.js":"cb5c33dd41cfad622abce5464a3ceae478904ea16ddc3c6c769ee33e0c086692","tests/ui.rs":"aed1b0f4e8c99b06657c54f3a74de4b3535ce567fb20e4d2fc6911b361c3d934","ui-tests/async-errors.rs":"f3ab249b3741b38c6213651a5cd36f8b9873bad34bd49d13b780d21bed47272b","ui-tests/async-errors.stderr":"5000b1fa11677c0c4224349e051c653e6ceab6f9b304d32fa3dec2def7269d00","ui-tests/attribute-fails-to-parse.rs":"c21c2a250534ca7e80fc462804efc0db8a71b6b0cdb0c57c5cab444d081f68de","ui-tests/attribute-fails-to-parse.stderr":"3bc77befbbe7e2d0744dd81067a75cb70c3f2d8bd9c60ec5bcb2dfb65fc1a593","ui-tests/bad-signatures.rs":"96b53e9327cc75747510b548b97cff86429532d5cdf65cc991211bca5646abc2","ui-tests/bad-signatures.stderr":"931e934ccbc43e4cee41a46ecaa3953c3ccdef69450519a838b9af428f75fa72","ui-tests/import-local.rs":"783ef9ebb792111ec7fd335cbc4f684381609c86c0af660fd5ab35cf04cacbf4","ui-tests/import-local.stderr":"6e90ad05c3783d7c69ff4e156458c63ee45ceb7ea8ebc38e1ca52e7f46e8bcf8","ui-tests/invalid-attr.rs":"603cf0bcb95a42a35e535a7d9577dc8c5e6175af4cd27d83fdf77cd6b67acf48","ui-tests/invalid-attr.stderr":"e1fd9450e16f1d672cb708bcbaf99a07f916c48d3e961c1dd1e92bd835d3ec53","ui-tests/invalid-enums.rs":"bf473e1bbafbcde82c946311e824d97bd1f941cfc5c1495025d8a7a513b90a19","ui-tests/invalid-enums.stderr":"ecd549ab69e7d7d645922857e2a83b7171f97a276afeb9f113407a4181b2b9e2","ui-tests/invalid-imports.rs":"94724ba9f08fde1830d82b332aa1833850018d8738daefda3fe2516190b6842f","ui-tests/invalid-imports.stderr":"21c96f9bb3b9d0951161b05ad413739ab436242a107e4fe0f9b029b9fa4b061e","ui-tests/invalid-items.rs":"ca919f7fe6c0d9fd4218ec43c85d7b43f478ed3042959479eb42adc23f4edf02","ui-tests/invalid-items.stderr":"a7392f1b918cac6eda3cefa5244dc555e4b6332836cab0bbd341b992672cd064","ui-tests/invalid-methods.rs":"c463bee9962d936ef2aeb4051ebc5558c0b7fefe6e459f3a325482763746969f","ui-tests/invalid-methods.stderr":"ca21b68621674208b7f95b4a201b9726e4bc07ffa127140dc13656d68db2e2e2","ui-tests/invalid-setter.rs":"db9666df889b58246a51ebc7d753e41ac4382475257a589499a4e886e6fbc45f","ui-tests/invalid-setter.stderr":"d1629836ec39727bfa4737538e9f991cda6fbaeb1c0f8c878cb13757e66daac5","ui-tests/link-to.rs":"be7003f80bf05cffa1301d049bd8f3792513a3f3922da3e74f4b58086970bb85","ui-tests/link-to.stderr":"c582600658db54acf3c16ffde723320a4cbcca3514cc30659badb524a06f66e7","ui-tests/main-async.rs":"0d9aedf6158295d9b4c9ed391f979073c1e294c0be8cdd310444d941826b02bb","ui-tests/main-async.stderr":"ef9b711e9db3bbc3d0cbc315044eb6f72139bea4b1785b12f33d521e280d5056","ui-tests/main-debug.rs":"b9fa920c4fc28b0815aed752b90e77723c3291670b6e35372d9d2b05a1ac19eb","ui-tests/main-debug.stderr":"67f5ccb2df878c02a3b394273ccf531fad68f289712140956186c0e9fd83f8f3","ui-tests/main-infallible.rs":"a75d80b13fed301181d69bb6f67ad082c3f1976ec9effef17aadb31bb1160f2a","ui-tests/main-infallible.stderr":"11629a59febd8874c1a87791f82e43cfefc9e10d7c5352f322c80293518b8f47","ui-tests/main-jsvalue.rs":"5f9be90d6603c836aa7eaba0a6014975b6974e895602f4171f5631bf937a4278","ui-tests/main-jsvalue.stderr":"9d6989822f1656100be44f5a99f3a6c0d8127fbd0d47b7a34f2c8806aa957f3d","ui-tests/main-unit.rs":"88c746ad86b282c0da5271a335126396db6701b963d7db3286271edfd5b0a503","ui-tests/main-unit.stderr":"5ca86669158c9bff919785ad330745ed80d38e3ff8d1d32c3ff47752fcec8196","ui-tests/main.rs":"0dbbca3882dcec75e1137e6043fd053d8c8cc6a17276ee1dc9088cfaaf565e88","ui-tests/main.stderr":"dd04c49d88dab17ffa0add6603b81407b7f4f43cef63c1afc19bcf0e25a11128","ui-tests/missing-catch.rs":"705bf784db641b30131510b5c47192014e19aeeeb6f73ede1d5356ad2c29915c","ui-tests/missing-catch.stderr":"e8e0f31e0be84a9a932ec899eae358c3b448732d4c1962461d0d321ddd0d7055","ui-tests/non-public-function.rs":"0fe075b32c211870bcde0f7dce0eceaffb61a4f8a6ffbd90946a59d7d220343c","ui-tests/non-public-function.stderr":"c9f6f5123b6c3462b8952d6e468ed13c566635d4939b98c9098d2a713f5aa2df","ui-tests/pub-not-copy.rs":"1e50f0b63a6e6363b0926cf947b0492a9803ddb35370f32e733a32506df9b556","ui-tests/pub-not-copy.stderr":"1090980d08622552b82c13da82b4c26ce309314b6062f0c5443a65eff5255d00","ui-tests/start-function.rs":"a56f1309182e597370555c18aa31e240e70e82585d6e72ab4c42e2229a8c1a53","ui-tests/start-function.stderr":"b93aeac4cb81cb2d03cfe6d7952e1a3a2568cb719e199df5292c2210058c9219","ui-tests/struct-fields.rs":"8e70ca9716e4432a014a279cf2714aa4e15d2d9dfb198ad93f2fe9b6037ff8c4","ui-tests/struct-fields.stderr":"f1cd67f6c12de58b3cda3642f0ba199ab634ec0fe280d5d98d0b6306cbd00475","ui-tests/structural-and-final.rs":"1571b078a9d0be6c96ab97be10f1bf369dbb740f04fa312834f49a64130f8d30","ui-tests/structural-and-final.stderr":"cf21dec2851d3f667b93a317ba9e4657a623c49e8b779ea64669452297ba0a17","ui-tests/traits-not-implemented.rs":"3445e15b9c61f84a1f8d703a3a4fe2d2e2d85960ff6b2ac718644d97bf1564e1","ui-tests/traits-not-implemented.stderr":"73a585b5cbc646289d830c8bd696869f0ea643ac24f3eeddaadbb711490b7934","ui-tests/unknown-type-in-import.rs":"7fbc95bb82d0d60568b8daf27236418219c57447d1dc2e2e384e5f907bac3e3e","ui-tests/unknown-type-in-import.stderr":"348350a2591544623f96246d860b47c64ef43933b8ac447ec7ff6fab7bac00c0","ui-tests/unused-attributes.rs":"7c20441c30e53376c9e72fcf82da0cc6e7462eec3087f9eb74f9682eaf7fb3e6","ui-tests/unused-attributes.stderr":"461a3724155d6007e75191233d0ff9a4897eeaed04f2ab8582636f17e62f46ac","ui-tests/update-all-references.sh":"8b8dbf31e7ada1314956db7a20ab14b13af3ae246a6295afdc7dc96af8ec3773","ui-tests/update-references.sh":"65375c25981646e08e8589449a06be4505b1a2c9e10d35f650be4b1b495dff22","ui-tests/wasm-bindgen.rs":"49ba1dc3f1847d564afb472ff965e1bf00398e660771b2481bd65515f28439ab","ui-tests/wasm-bindgen.stderr":"32bb74ff13adb4361d75be7deef95e0158f53b0449ae73cd67cc82ff0d7a83a2"},"package":"dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"} \ No newline at end of file diff --git a/vendor/wasm-bindgen-macro/Cargo.toml b/vendor/wasm-bindgen-macro/Cargo.toml index d20cfc11007db2efb5bfbb18d8ec036e167480df..178e9c5cb2bd3b26aa4e6a0f59d1495c31703261 100644 --- a/vendor/wasm-bindgen-macro/Cargo.toml +++ b/vendor/wasm-bindgen-macro/Cargo.toml @@ -11,8 +11,9 @@ [package] edition = "2018" +rust-version = "1.56" name = "wasm-bindgen-macro" -version = "0.2.86" +version = "0.2.87" authors = ["The wasm-bindgen Developers"] description = """ Definition of the `#[wasm_bindgen]` attribute, an internal dependency @@ -31,19 +32,19 @@ proc-macro = true version = "1.0" [dependencies.wasm-bindgen-macro-support] -version = "=0.2.86" +version = "=0.2.87" [dev-dependencies.trybuild] version = "1.0" [dev-dependencies.wasm-bindgen] -version = "0.2.86" +version = "0.2.87" [dev-dependencies.wasm-bindgen-futures] -version = "0.4.36" +version = "0.4.37" [dev-dependencies.web-sys] -version = "0.3.63" +version = "0.3.64" features = ["Worker"] [features] diff --git a/vendor/wasm-bindgen-shared/.cargo-checksum.json b/vendor/wasm-bindgen-shared/.cargo-checksum.json index 9fd56957c780db2e4e93ff50cfb02e6e1692d1f0..718378b79c41613303902803252c144b8c8bdcde 100644 --- a/vendor/wasm-bindgen-shared/.cargo-checksum.json +++ b/vendor/wasm-bindgen-shared/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"7cbf139f151fc64bef55544f4d03b5c0b07f5d92e3cb1f1454cb54aeeee8b7ec","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","build.rs":"1945abcbf05206be9463f60094b4363079f284781ed009feadb0137953826c26","src/lib.rs":"dba0dbf9c63bc9656fcae31ba2ed4b919d33213e8b49e9012759ddbeb1d2909b","src/schema_hash_approval.rs":"373cba7088fdafb2c55e6da265c4116e06152f632943ce8618774c57c8ff178a"},"package":"ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93"} \ No newline at end of file +{"files":{"Cargo.toml":"dbb905112425fde2abdaf35def46fcd8cb7479969ebf870d23b7e19353622353","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","build.rs":"1945abcbf05206be9463f60094b4363079f284781ed009feadb0137953826c26","src/lib.rs":"09cafcda96f0a28432e54687c7a1d944a70e9816eac3f87a30bfd427d5d63119","src/schema_hash_approval.rs":"8eb87db04960ad6e6a95868059c4ab2177baca4f846976ef308be5c074378ae6"},"package":"ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1"} \ No newline at end of file diff --git a/vendor/wasm-bindgen-shared/Cargo.toml b/vendor/wasm-bindgen-shared/Cargo.toml index ac31232b60f09d25b0f30ad113d4a62667c863df..06f527b39efef801878d267e2e75ba385c422045 100644 --- a/vendor/wasm-bindgen-shared/Cargo.toml +++ b/vendor/wasm-bindgen-shared/Cargo.toml @@ -11,8 +11,9 @@ [package] edition = "2018" +rust-version = "1.56" name = "wasm-bindgen-shared" -version = "0.2.86" +version = "0.2.87" authors = ["The wasm-bindgen Developers"] links = "wasm_bindgen" description = """ diff --git a/vendor/wasm-bindgen-shared/src/lib.rs b/vendor/wasm-bindgen-shared/src/lib.rs index 54647d32a5d263efc958d72248c844fe99283d76..fb3e92cd95f49ae78292d44b5c352c72f44890ec 100644 --- a/vendor/wasm-bindgen-shared/src/lib.rs +++ b/vendor/wasm-bindgen-shared/src/lib.rs @@ -6,7 +6,7 @@ mod schema_hash_approval; // This gets changed whenever our schema changes. // At this time versions of wasm-bindgen and wasm-bindgen-cli are required to have the exact same // SCHEMA_VERSION in order to work together. -pub const SCHEMA_VERSION: &str = "0.2.85"; +pub const SCHEMA_VERSION: &str = "0.2.87"; #[macro_export] macro_rules! shared_api { @@ -152,17 +152,17 @@ macro_rules! shared_api { } // end of mac definition pub fn new_function(struct_name: &str) -> String { - let mut name = format!("__wbg_"); + let mut name = "__wbg_".to_string(); name.extend(struct_name.chars().flat_map(|s| s.to_lowercase())); name.push_str("_new"); - return name; + name } pub fn free_function(struct_name: &str) -> String { - let mut name = format!("__wbg_"); + let mut name = "__wbg_".to_string(); name.extend(struct_name.chars().flat_map(|s| s.to_lowercase())); name.push_str("_free"); - return name; + name } pub fn free_function_export_name(function_name: &str) -> String { @@ -174,25 +174,25 @@ pub fn struct_function_export_name(struct_: &str, f: &str) -> String { .chars() .flat_map(|s| s.to_lowercase()) .collect::(); - name.push_str("_"); + name.push('_'); name.push_str(f); - return name; + name } pub fn struct_field_get(struct_: &str, f: &str) -> String { let mut name = String::from("__wbg_get_"); name.extend(struct_.chars().flat_map(|s| s.to_lowercase())); - name.push_str("_"); + name.push('_'); name.push_str(f); - return name; + name } pub fn struct_field_set(struct_: &str, f: &str) -> String { let mut name = String::from("__wbg_set_"); name.extend(struct_.chars().flat_map(|s| s.to_lowercase())); - name.push_str("_"); + name.push('_'); name.push_str(f); - return name; + name } pub fn version() -> String { @@ -200,7 +200,7 @@ pub fn version() -> String { if let Some(s) = option_env!("WBG_VERSION") { v.push_str(" ("); v.push_str(s); - v.push_str(")"); + v.push(')'); } - return v; + v } diff --git a/vendor/wasm-bindgen-shared/src/schema_hash_approval.rs b/vendor/wasm-bindgen-shared/src/schema_hash_approval.rs index a410a360ac9fc509023dc7a568d3cba404b33bd1..731dcea02142ecfaeac03d2556c0ef51df22e299 100644 --- a/vendor/wasm-bindgen-shared/src/schema_hash_approval.rs +++ b/vendor/wasm-bindgen-shared/src/schema_hash_approval.rs @@ -8,7 +8,7 @@ // If the schema in this library has changed then: // 1. Bump the version in `crates/shared/Cargo.toml` // 2. Change the `SCHEMA_VERSION` in this library to this new Cargo.toml version -const APPROVED_SCHEMA_FILE_HASH: &'static str = "11107065389885651666"; +const APPROVED_SCHEMA_FILE_HASH: &str = "12040133795598472740"; #[test] fn schema_version() { diff --git a/vendor/wasm-bindgen/.cargo-checksum.json b/vendor/wasm-bindgen/.cargo-checksum.json index 88e93f8e58010ec120ff71a91c9c6493a869393b..64d220e236ca4920f40415ae8610b0b0d6b4e0a3 100644 --- a/vendor/wasm-bindgen/.cargo-checksum.json +++ b/vendor/wasm-bindgen/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"fb3068026aeb1de33b11995aa27897508ab24a8866d0bd58c655ab13dbb2fb06","CONTRIBUTING.md":"aa138d76f5cb25bba1a6942a230373aaed6be73c619f945cc4657e13ba69f897","Cargo.toml":"34a2d57bc63852ac6f6c51fcda4d67abcd7cf6f2a027f7fdfd8c1058865fa997","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"8e0075aceb58e5db84b7debf46f7a3fde437573f46fe9aad6421a3a081575cbe","_package.json":"64c943903ffc064a2c5506e46fce690d7f566589d0d8e71804ec1638d1aabad5","build.rs":"95d57e593c411b82bf88819765d6422db2a65c1bf489b63f87e0aefeb721fc41","examples/README.md":"e5396e95d8130948e48b767ab505c46bc69f6ff3ebfe0d9709068cf42c250818","examples/import_js/README.md":"bb53d4a264e9a084effdc7a22ca7d5acca0207b411478b98782d881b7fcade51","examples/import_js/index.html":"f4825d155bfe0059aa182a506d6d076d1ba5f118e46365ac902b12f27a6c8c0d","examples/import_js/index.js":"d425b7b0636dc5c5046bc96e6bfe6ef3bb1503fa91c54f40ecb457a1b060ee5c","examples/import_js/package.json":"bbbfbfa1a62779e38ba30c920d27aefaaf10bf6add3a89a65b7d2b093c1fe017","examples/import_js/webpack.config.js":"fc314556d2f0c6266cde7c47afaceebe474be97c0401985a23d822ad9dd0105a","guide/book.toml":"d8cae5ae5fbeaab5b6852c64b975d37f51592a8e9eedba22c898672d9b11e9be","guide/src/SUMMARY.md":"26355c6b0e8391429736fc5515b03a0e160d792710c6765645aecff0cc9bd171","guide/src/_headers":"401cee68df5967f0aa509a1b978a83f06e8e830deca1433964703e7a1ac2c646","guide/src/contributing/design/describe.md":"3186f9795be894708788e50d2ee745b9bd73bc94fb3dce67f3f1fd5e7fbd3659","guide/src/contributing/design/exporting-rust-struct.md":"2ead6b67f241bab543bb96c80e90b63abd67822a7c94190d2f2d1c9809a59b87","guide/src/contributing/design/exporting-rust.md":"4dd822967bf2fc111ad69c1dc4619715b692349208e8780dd8f54b571fb57e2e","guide/src/contributing/design/importing-js-struct.md":"848d0b144b28a5ae1ca3760438e71b938cfb2ee350f5b902fd08c38a0a64e27b","guide/src/contributing/design/importing-js.md":"c949c8921c213ba21b08f705d4611304acba47b68c35484fe968a80194f3a9ab","guide/src/contributing/design/index.md":"3bcd35bfadc3fa81d26dcac23f2e2ab5c3e2874cb6a88d0d892c5effe535fb04","guide/src/contributing/design/js-objects-in-rust.md":"0a18922b509ed8a6cc6724b81af6e6d469b75b3796dba770949a8b59d8067455","guide/src/contributing/design/rust-type-conversions.md":"efd7ddcc55770b5a2b68d542fd6aa128a9d4f60eaa5477481a1827c11b17dec0","guide/src/contributing/index.md":"e5115ccd2403b929d65acb9626bff8d66e10d1eb625a023ea017f2271a3e49c6","guide/src/contributing/js-sys/adding-more-apis.md":"d6626d530fa5b73f045a20bf123d5e261ac2ca3bd64cbb80b655612f9b9a6276","guide/src/contributing/js-sys/index.md":"9c0864ca52e8699148e789c2a6ba2d3044ba2358d7106a1b7fd725d3720dbb54","guide/src/contributing/js-sys/testing.md":"d1f613c88793ffce61b2d77aa40e3a91a1de3c73ab9f8eaedfc39da16c93ad07","guide/src/contributing/publishing.md":"012c31c7037ca084d0c2a65c2dfc0be6fcbe5c118307e9efbb4f6f781ae48e43","guide/src/contributing/team.md":"a3f993cb1afeee767e85077d135b1ea08850c433a69c436ebe6b7a48124ed945","guide/src/contributing/testing.md":"b6d45f2a177525e1fd9b7c8a0d47f0bc156a9327795bcb4d96716851f94ff2db","guide/src/contributing/web-sys/index.md":"6b4d5e00cbbcaab29295a3bd60e90b7f72b118758966622a307d9222488707c1","guide/src/contributing/web-sys/logging.md":"ee960ec9adc174183fb349acdbf5fc647b6f9a290022be9b118b9de37b8b5687","guide/src/contributing/web-sys/overview.md":"e6179317f75aa8e836e3c803f5d814e87119763709eea47b04cebc86c089d80a","guide/src/contributing/web-sys/supporting-more-web-apis.md":"a3817d09c6cdc3cb28a1b77cdad5e4436ab5bc37f9d681b1e495815ca91de85a","guide/src/contributing/web-sys/testing.md":"77f8e4b45bd0e27676dd503474bc32f91672b23c6ab7127a4f5b828dc8ea40e4","guide/src/examples/2d-canvas.md":"44a0eb82ec3398ee63a6df5aab103f1b002082eac2d129f656d8519cbc0829e7","guide/src/examples/2d-canvas.png":"b202cd79b20c00d49c40d71225eefea99306015858a432ceb7592d53c15300f7","guide/src/examples/add.md":"8dac740d6a4c499d868c29d8426d113da9cdd6ef22bf8084b8cf8c1de513b09c","guide/src/examples/char.md":"93f94a1b670322d0dc21b46d749909c414f9f254e2dd97afd8afe8cb0e5ab908","guide/src/examples/closures.md":"669dfc47a670271d7ce7a3bd2c08620b698b01ea8b2a7b1cc2047a77e7617130","guide/src/examples/console-log.md":"6552f4d766291cddc0eade75e4f64de9f10e00b89a0bedb1b15dcf7baa90b6e0","guide/src/examples/dom.md":"44ad74370b3727ec98f958273c639e767f2ae5b75e96ef53e74be1833a630272","guide/src/examples/fetch.md":"0f9d08e240bc5ced13ab154182aedef7fa7b00cba784c65727aa15be27f86d7c","guide/src/examples/hello-world.md":"d5f4d830c316a91e951cdaeab5cb23ae47dbc910b05de849e67bef1ea709564f","guide/src/examples/import-js.md":"0480a6aa32b1fdc1347cb3d0c4f2a006caeb33c75ed21eb78ad800f012cbc2c6","guide/src/examples/index.md":"4e629f42d7bfb52bc35856b6e21c3aa7433563482697212d7b54f1bf619b56ed","guide/src/examples/julia.md":"0cd4ae1de24d657d7869c984dec61cc8b796621365be633212bdb2a6d57ce727","guide/src/examples/paint.md":"06c6c04f121080e0e5600b4ad300df9e93b5d4b6342f42c421e6dec1f2955ced","guide/src/examples/performance.md":"de888713cf0a047bd4a28a1ca890be51d99b6aaabc9a2b134280b768a7148377","guide/src/examples/raytrace.md":"6769cf3b7bd14e9814e751927fde8c5acb443c5e82758285a1ee4f91e577a870","guide/src/examples/request-animation-frame.md":"26eef6b203acc0b2667d9c4380c39a44eb4b97991efeded9ca32cc9ab454e993","guide/src/examples/synchronous-instantiation.md":"c2f887e4754535c453d22438c3179d71d2468d8994a61330a362132c73157ef1","guide/src/examples/todomvc.md":"b872c5631eae969368d147342fca16dadb6f0412f8922230c27271370e9d3d97","guide/src/examples/wasm-audio-worklet.md":"dda392cb5beb75423bd402661d0de85de7acf5098e38ecf167533774b5b9977a","guide/src/examples/wasm-in-wasm.md":"5439a690e7107736e6f8b92e475f0a45e83ab9a1e5a0fe02e8f6dd93372590c6","guide/src/examples/wasm-in-web-worker.md":"8877a952ba93bbf52d85acb7a6a38d318e5638c36b86338156c4881cc704394f","guide/src/examples/wasm2js.md":"48f953dfa1b17b68e5d983231e991797e32e9bc22b9c3db72c2d055e08449a00","guide/src/examples/weather_report.md":"184bf64d58820b032a80c738050e7b2cd0042eb722f61c7e8a3c531239f72db2","guide/src/examples/web-audio.md":"32bb18c9e4f167614ce3fb61d1d04265449f88da40949834b50baf9e37063fbd","guide/src/examples/webgl.md":"15570a0a081c2301981a1fbca0bd39dfcf35221c64ddfb8e8f4477660658cb08","guide/src/examples/webrtc_datachannel.md":"47b06b1b00c41f048fad3c2206399cae2d8dbd90b6d83953c138826f11677eb5","guide/src/examples/websockets.md":"704f9d5c1d13426e6e64e132cb0204be3c10a54dbfa5f1c834adc4efb4a1b8d2","guide/src/examples/without-a-bundler.md":"c25c28ae01905615bfbfb88b43563e04db76cc0d87469b63453053f62d8a4930","guide/src/introduction.md":"057e81f8f62d8647e51d1269bdb5788654be2e22fea23d155ec5a15bbf8bae1d","guide/src/reference/accessing-properties-of-untyped-js-values.md":"a91e3eb706ddd15628072978906e2faca31560de616c0630316d9f6eff6b55bf","guide/src/reference/arbitrary-data-with-serde.md":"b281146412f6bda893f146e84721677f003cad57af941552c2faf534b61b2d98","guide/src/reference/attributes/index.md":"12b57ebbd0c9ba42d9f10d752c9943d9beec90d659d1b1ff9e9bfea02572a2c8","guide/src/reference/attributes/on-js-imports/catch.md":"da230e6986ca29f1e82313b82275ab9c3b2144906271cf82b27772541d781d84","guide/src/reference/attributes/on-js-imports/constructor.md":"89f8be11c567b4611c84209b34351238553d5360d7f7665ea25332e1544c5b99","guide/src/reference/attributes/on-js-imports/extends.md":"84ece37398ba0df66f890982315f082c52b5f027e03c20527755abe610c2567c","guide/src/reference/attributes/on-js-imports/final.md":"2ded2c23194cdb5f0b064a2114cbc8a6a1c1573363d797f162c4683bb2f1c21d","guide/src/reference/attributes/on-js-imports/getter-and-setter.md":"27f3c2738688a43e611524e5e3ab7174a1993026a69098b75780a388aeb5e745","guide/src/reference/attributes/on-js-imports/index.md":"2219a4514fe9597cbbe6c46014b57c38f1e85f3d0775a8a7880f50858cb13633","guide/src/reference/attributes/on-js-imports/indexing-getter-setter-deleter.md":"11d5c03f922294894fe0147fae96e04b26a5adb36ce91296e52729a9fe5931c2","guide/src/reference/attributes/on-js-imports/js_class.md":"d51c5f05b71bbf6b6ec8e0c36314ae299fd7eb07be989e721b79b599405b3486","guide/src/reference/attributes/on-js-imports/js_name.md":"12457466f3510256a51a78f52b09f7cb1c0b0ce3ef636e028cd2c372fa9e8738","guide/src/reference/attributes/on-js-imports/js_namespace.md":"acaccd162a982c1c17b659ce5daa1d5a0d184b9b07728fc5bb17a89f327ffafa","guide/src/reference/attributes/on-js-imports/method.md":"d54246efce5d7a104702439ba509bcc5bfbb0b57253edebdb696617daca80bcd","guide/src/reference/attributes/on-js-imports/module.md":"b47cd5ccbb69955f1d47101accc96fcd562abecbf7e34826f7f3c585d6b9dad0","guide/src/reference/attributes/on-js-imports/no_deref.md":"7d58bb3b6f768e38b949727abd1ee621ad09ebc537f83a8a20d0eeddf3771b95","guide/src/reference/attributes/on-js-imports/raw_module.md":"f363e5f3bc401b7e350eeec49cffde85dfb2346d597f38d98993fe5bfb9ff649","guide/src/reference/attributes/on-js-imports/static_method_of.md":"d5a5d9623ee55097f26e190b478e75f2e7d2ffc30e51ec647f39933d3d4e3b18","guide/src/reference/attributes/on-js-imports/structural.md":"364e01a5792029e9a5fa582375736efcee006352834ee273d218da89b77dd8bf","guide/src/reference/attributes/on-js-imports/typescript_type.md":"9cae454e9134ca1d14e2af3c732f370335332c615bf03ac49e525ff6f1877cbc","guide/src/reference/attributes/on-js-imports/variadic.md":"1ecf00149be472e3111f188c053092f3274fb33453414516a305084d8e92c4df","guide/src/reference/attributes/on-js-imports/vendor_prefix.md":"47a8d47e0cd745cca697f6d944e145f02695ca422255c3d6e1c9b2b719994b1b","guide/src/reference/attributes/on-rust-exports/constructor.md":"d3878fdb36174e5662ccfdf0fb027ef8175a7f8ca14ccca875217e03f5d5be1d","guide/src/reference/attributes/on-rust-exports/getter-and-setter.md":"464a2d41a791bd8ba5a8b1c4aa64b2f865c42b98a2d1289bb65e766e98a1b56a","guide/src/reference/attributes/on-rust-exports/getter_with_clone.md":"11a04dba4d66c19be0e234014d21ccf9cd0b76169b723e90ceb81d719478f283","guide/src/reference/attributes/on-rust-exports/index.md":"9fe778a0dd013a874db484cb22b1d9867bfe6d69cfbbe5cfeaa8ab78cf19daab","guide/src/reference/attributes/on-rust-exports/inspectable.md":"52fbcfdb83c426430a95692d566a4709255e25b24be5704d7378a4196a8c5908","guide/src/reference/attributes/on-rust-exports/js_class.md":"f4c0d8e8021001578f7d300e88c438d1a7806c17cc0d8acc3b4134922a75affc","guide/src/reference/attributes/on-rust-exports/js_name.md":"77f035b6391b9e44f254a411ba18687c5fa6110e276be73b5ea347701c8dad42","guide/src/reference/attributes/on-rust-exports/main.md":"d1a42470fb0457b3471e96ba22ca270c1cfc9d5fa781240a9d8b1aef32641ff8","guide/src/reference/attributes/on-rust-exports/readonly.md":"a5da847ad36557f03b1c79a83d14c219dce914021266133c204260bc041b9b89","guide/src/reference/attributes/on-rust-exports/skip.md":"b9972241b8d473d1a46ef3c2861065ca296cdc923883c404f19f1d859bf914a6","guide/src/reference/attributes/on-rust-exports/skip_jsdoc.md":"6c400bb6dac1083449758448e5e7a576d40f371592cd597ea95ec441fefe19f8","guide/src/reference/attributes/on-rust-exports/skip_typescript.md":"1622c29b0d93a884bd0b5b2a62107a594e2919758c80592566e7786efe788b89","guide/src/reference/attributes/on-rust-exports/start.md":"db6cfb9593b7af1a95112c135c202d00c609651df16abc174d2f38310809ad08","guide/src/reference/attributes/on-rust-exports/typescript_custom_section.md":"6dd69f15b6f6f632880b7a65cc49abe8f4f95fdead753c576d81a3268dae4985","guide/src/reference/attributes/on-rust-exports/typescript_type.md":"1960cbeea1047a0fdb936e3af4556ae805e9777323076b9f3820cb3986f27de6","guide/src/reference/browser-support.md":"177fff4ee6a68c85f045cec47bc7aa40de66fc95f8cb59128e8ef2d6972dbd7b","guide/src/reference/cli.md":"809daa3dbd7da7aa01786acd9602bfb4f81546c010568bf1f56d95eaac7dc29e","guide/src/reference/deployment.md":"1954466cd2ac6c5326258364f6390b10cee9c2729e7c2779f2a50f950c7c9523","guide/src/reference/index.md":"c603c3a7f265afb7c7b5eb391b32f6115f8842f3f422fd3730be4f90c4796bc4","guide/src/reference/iterating-over-js-values.md":"ec00f09516eb7de98bf7296f44b6aa9ceee3fae1dcdb7cdf8f36963d45b7ebeb","guide/src/reference/js-promises-and-rust-futures.md":"5f0c0b990f5b55c8d9485f7cc66a617f79cc232705562f306af97785c7ed1f79","guide/src/reference/js-snippets.md":"dff5adcbf66f06322e606c672ef070c2a0375f1ae592ca8a9da36a50324735cc","guide/src/reference/optimize-size.md":"c10abc1ea0902c9a57b74808bcf75bf092c0c2bb4082962b85d18df7593602c1","guide/src/reference/passing-rust-closures-to-js.md":"aa18f75ffd4b7779a2699b1bf969245ec0e1a70b24abe61e8877c2eb65f6ef60","guide/src/reference/receiving-js-closures-in-rust.md":"fc9c80ba5e1a5f243a66f68caba27e8103652aeac3765a9fad2d0e16113fede3","guide/src/reference/reference-types.md":"91d178b7fe2ec82eec4d8926a08b39ac16898172d6f65aee84347c6918033c67","guide/src/reference/rust-targets.md":"467d5cf7eaa1d4b89f9f5b2248cdd1a10340ca1db263ffff5c483ce10dcfbf54","guide/src/reference/static-js-objects.md":"930288fc463d16a46a6546f5f65af21ff6e4b94259d9a1e8bca9d660f9770604","guide/src/reference/types.md":"859123f51fa932fa37d7e47cd5c46956929793bd3accea050d3be516080ed78f","guide/src/reference/types/bool.md":"e954d93ec5096837d4dd2db3f23e71c14483279e347ca8908ecb49aded6e497a","guide/src/reference/types/boxed-jsvalue-slice.md":"634e51ce92770e6078ca3303be946272af3f092f2703c90601ed8f9092c69a53","guide/src/reference/types/boxed-number-slices.md":"1a217a68ff549f4208f99863d6616521c9d466542c1156bcc2be7d3a73e4edd4","guide/src/reference/types/char.md":"01f2f7bdb25a9a52edd93dcbbca6a29269a8d5adf6cb94dcadea29a7aace22f4","guide/src/reference/types/exported-rust-types.md":"d2f601d7d39ae92326c5624e1e2a2795f1f47accb92ec030c987b6c709681906","guide/src/reference/types/imported-js-types.md":"c82dba871a26afb7b90ceec59892adfec9bec550665a74d190a4fda639f61d5d","guide/src/reference/types/jsvalue.md":"46d74da47f8a517249de4dd096351c10d658d9c3535950a34c1fc5d5b42eb2f7","guide/src/reference/types/number-slices.md":"f380258fc058527c7dd6f49664a4e9dff69f0b03d626071aeb61efefb2a0b646","guide/src/reference/types/numbers.md":"cce95c07be08c1f16327fd4c7e79b7c480db9cc95e2b07514d31e51bd6122101","guide/src/reference/types/pointers.md":"3710b736f790a97a325b1883d5fa8104c16365446ef702e9dd29bda74699043e","guide/src/reference/types/result.md":"78be87e86c35d2bbc1b863217c1a7592af9f2c699902f44e22d1bc4b1c0664c0","guide/src/reference/types/str.md":"6cc086b02ae3d3565678e69d91dbf105f1f310009097a37fad4c812e25d4b7c0","guide/src/reference/types/string.md":"9e42298135e0aec11bb924e3a2b5002335cfe290240b48db12dc981156177cd0","guide/src/reference/weak-references.md":"8dc6ca26c478fceff12e374e11e2f01fdf5b6a88b7302d449d4336859f4efe8a","guide/src/reference/working-with-duck-typed-interfaces.md":"a23f1f98019fed2060e1fbce954ec457e77a3a17524f34ca861d256d2ad4b6ef","guide/src/wasm-bindgen-test/asynchronous-tests.md":"c24c381b719b4bd7b0c181da1db59170e822c142eb22f95c4a6eeb8fd36df3ab","guide/src/wasm-bindgen-test/browsers.md":"4a32d955e907134d71bb8cacb6a8a3eb290622156251f50f6a3946d799314e44","guide/src/wasm-bindgen-test/continuous-integration.md":"5865990ef231b3c99a9c1bc18f7b7f054a29b77ac7b671fcf1cd6bb4f4304ae8","guide/src/wasm-bindgen-test/index.md":"64fbcd222c3c597109d2717a3574abf2041ff325c26ee07d58c4cd7ba1c1f8ad","guide/src/wasm-bindgen-test/usage.md":"a1da64eaaf8fe9bea366724e08a4ba63dc984f86a28cc393fe00dc394ab244d6","guide/src/web-sys/cargo-features.md":"0e50067a7a46cee3d1b21a2690aabc539379cb1452de377ebaa0eaa4e5e587b2","guide/src/web-sys/function-overloads.md":"90a08bb955f7c79e573f83c31d5e7431ae1e3ad7001792ff8ff52e4299364fcd","guide/src/web-sys/index.md":"345499d0840fd23a2e5eb5ac497665decbb3f836fe9f4f88301ae4b5fbd8d44f","guide/src/web-sys/inheritance.md":"8f18af20b930497e2fae4a266dd27e317d1ea3510266c21b32f351354b495ff2","guide/src/web-sys/type-translations.md":"687ef5e4a3961fddcb94d24f69abec0ea64f6df306f4593974b69589215980b1","guide/src/web-sys/unstable-apis.md":"e74c3e72136d6906dd60258a27f34e1ea4612e7c8e95662596475dc557151cfb","guide/src/web-sys/using-web-sys.md":"523e16af6e27703a4a0582568bc97710350222af20801907268d2d8c197fb667","publish.rs":"6352715cf06a9e373a141e34991fa97ec5bdeb0ce7d623a4fbbe9448ef1bea35","releases/friends.sh":"f896ccdcb8445d29ed6dd0d9a360f94d4f33af2f1cc9965e7bb38b156c45949d","releases/release-announcement-template.md":"fcb3c75cdb8d5d6ce8a198f5570c967313f751d1eef0790b34a518772b2e8a38","src/cache/intern.rs":"b78abd7502ad069bbeb61073d1972c717a469849222037565b50514192c187a9","src/cache/mod.rs":"8989143b55160dbc142cb20c6e066cf0a3f70d6c97fbc9aa0fac59bd62bd865b","src/cast.rs":"da53f21aa485c0dae184350d2693ab41e3fc7a34fa300c19ad718f2b7fc2d42b","src/closure.rs":"29fc2562075146d0f6c927ab818ca12391701781173b28d5ff72f8c28ec42159","src/convert/closures.rs":"f2d841494b866d7b147a79945ea4cfd8b6503e7553a0eac66e720521f094cbfb","src/convert/impls.rs":"53b99adb5f6c50b19bf1936952693e226c0e86b703c20ff29859ad9fa25996ef","src/convert/mod.rs":"566ffd1f546afdb8d24c6c0d6faa00a28596a67ca6f2f39e9485add54400443c","src/convert/slices.rs":"ec1d91b1285844e03a954ab67e18c3edc22aa65ebb964833ea42b75aa570d7fc","src/convert/traits.rs":"e307a43f820160ee8a093347fed4531cb0ac4288d68f5f935faad6cc6520a84a","src/describe.rs":"f17b1d44ea933d892e7dcd5b92f191434d8772cbcfd65468e0a6c7fd0e77f910","src/externref.rs":"2c26fc2a85a04d131c70d14a425ff54d961a471fb2b53c378d7f5e3ffc6b9085","src/lib.rs":"c10aa84475220d627a8164b2e5f67569c80168faed131204d547de339f379ee2","tests/headless/externref_heap_live_count.rs":"41b2758762c91bd2d05995b1b8989651a6bf2e586ffad5597ff63f6d2dc6d755","tests/headless/main.js":"6de0a19b91330e9bc68334c4f1fa11c1cd6bf273f5ea3e470933ad800c962679","tests/headless/main.rs":"d86245fdd476cb6c275c0649d76fd348ab55b7952ece325c1ed4ec00051a1f73","tests/headless/modules.js":"a407c81d2670309ed484adf98a2e522f6ea031b1286416eb7bf184df7433d5da","tests/headless/modules.rs":"74f77f88bb5280862c06087d78c48ba930736e58db9a1e6c80450bb0e032b789","tests/headless/snippets.rs":"baf9d3c68e1b567fcba4e073cc0d24a8f039955e10dd1275e4a389574ff556d7","tests/headless/snippets1.js":"8bd0c367fdbc61f509728255750094bb36200a1aea74079611ad7cfa9c5f3f28","tests/headless/strings.js":"fca2d7a1afae31663607f956134a4f447aaee0f85d828addc3c4c1440f2e18e5","tests/headless/strings.rs":"4a64d8a4f9329a282d0f87408c0645ded71a7d023eaad40a32eaf60886a08375","tests/must_use.rs":"cae67a8740cd2c969a6b33316cd5036639048d9bbfecf55a5f45faaa624de1d0","tests/non_wasm.rs":"fbc7f10d3604f3c867f031cd218c2b29af2b42b1225495837ad5560878930ab9","tests/std-crate-no-std-dep.rs":"47f0e32bad7b9b11ca77d66d904eb3408c3528732899479039fb6db4c6e9ed9e","tests/unwrap_throw.rs":"79f05fa37249cea08689592d53d856019a90fd1b72c41413f7fcda5cf5913356","tests/wasm/api.js":"daf4b7e2b76b718431235eda5e221dd53037fb6bebbec6023c7e3fd2b806f763","tests/wasm/api.rs":"568fc014130d0d6dba5829bd577a91b645dde7a13061c187da872695cf731563","tests/wasm/arg_names.js":"0d7de3801257e18756a974bdd2950d2fb06755f7c0d1c681e03b56d97e828e34","tests/wasm/arg_names.rs":"decd8f71a58ebf662a586b7f19e41f6666782df0da74a8a2c69b7a504661dd79","tests/wasm/bigint.js":"b6d045afbbb7d5e8723b41ee2e9c22357c8c4c4aed804bbca2a9b42a19906354","tests/wasm/bigint.rs":"5a7e0e6e6753a5ce08c199334fd89f1cfeabc1305301d988d6f748e001ccfa2c","tests/wasm/char.js":"6f307035f2689f0827726503f201f8fd591100ff051a55bda23ddcaeaa2902f1","tests/wasm/char.rs":"44dc134f9057e6c91da32c7fdba5ba10785507ced161c07267548ee08308e6c0","tests/wasm/classes.js":"bfe8660c25933fa1cec1301db9a790b3df3d5a0f6911733ad2544a26b43dabae","tests/wasm/classes.rs":"5a0267be5cf432f892e8e24f1f6558ddbe9a88298096ffd82998348e852062f3","tests/wasm/closures.js":"6df2da8bad116c9ef244f35f4f14d1fd432e6faf43df30882c6464a521cc606c","tests/wasm/closures.rs":"a481b286e80df4b100e955b1d463b7f9b1dcf1f41f236cac2bbd08cf94f9ddc1","tests/wasm/comments.js":"2c3bf2e79ecc33f0fba33d13a91a1ae9390f9f7a466af8eb215636662e20462a","tests/wasm/comments.rs":"5a0068fe3e214c07da92a46b6e45a2771fbd8e04f14cb7802f32082b87a459a0","tests/wasm/duplicate_deps.js":"2226e4f65525c545ab45109879b16b2a92341b440178e75d3a9efb3ed10f7b03","tests/wasm/duplicate_deps.rs":"3a91569e54f56e178dc164f2d2b8537ec6a10b3161c23e1cc8e552805cd868f4","tests/wasm/duplicates.rs":"a2b4a7960e8a7c9b3fda943e8aadb7cbc0ba8fa1a6956baf40ba2f129bd591ee","tests/wasm/duplicates_a.js":"d3d685e95a54b911c2b9a64f7c0f245e3e492491368355044ae2cd12c3332044","tests/wasm/duplicates_b.js":"cd6c87905a5c5514239bba52a03e6c151d79a57a477f52a073b61ef18c98f642","tests/wasm/duplicates_c.js":"93399409996d182b5fe02548d3c5c3e1681939629e0261d6f19f8c1ee3b08dfc","tests/wasm/enums.js":"7b37ce390aba76477e4d54c5214624cfc5eec49e0f88ef6f535f06f23527864f","tests/wasm/enums.rs":"1537fda37a051340722c29cb5aadc9e1819a2e609f2569ca4fd972308d03fc7f","tests/wasm/final.js":"cfa7c496291f08b98f0406190ee4deaab9ade890d65ada4c223a76135e66f619","tests/wasm/final.rs":"25b0a85e87686e3f7a7a44e3ac25402d504eec7f9813a74ffd63c5f4428ee0ff","tests/wasm/futures.js":"175745daafcaed4cc0233809f4829228528c87030459645e8493b013cd3e9f98","tests/wasm/futures.rs":"ae9bb3180e8db20f4bf1e1271081f3a201acb4d19601074b0944ecefdd763171","tests/wasm/getters_and_setters.js":"8ba2d939aab232074860cdf1e01d1c58faee49a31ef35b585c962aceccb870a5","tests/wasm/getters_and_setters.rs":"e25a2d026375adda68b4591f2802ad941e0a212fca8d7ff6cf020eb5da5fa5c7","tests/wasm/import_class.js":"d1bd1dc7df5bfde686bea6fbcd32db6009b6853712cafb446af263fdebb1fb78","tests/wasm/import_class.rs":"a54b0064637f6b6fe5cf775fb415d0d391472b42c15f0432e5608729e825c2d3","tests/wasm/imports.js":"4069b7cf12ae0cca30a1e92750d0715e782a5c795ff21c0d5aae738f726ae8b1","tests/wasm/imports.rs":"6d14da460098c6fc6cdd78479ff3410884374681a1f7444b826df47e423e8f53","tests/wasm/imports_2.js":"ab251fc0a0a1921c60d316160bc120fd97da3c3753804174cfda2f08ff43208d","tests/wasm/intrinsics.rs":"1eac40553375d1e5250a9242df19837d1b448296d53ceb41f842c80996e958e9","tests/wasm/js_keywords.js":"d247be675cc73540fea4b2e50bb2b7fcedb2b0d511d85be6fb646876d3025562","tests/wasm/js_keywords.rs":"8a8d619c2930686ce1130034273d248f7f86f4bcc8fb202bee07d240e711baf6","tests/wasm/js_objects.js":"a2be00dab58716e4cbbaeba4da8512ba924c39d3f1cb405ba769ab8a780ed7fc","tests/wasm/js_objects.rs":"86725cea9aec227e562409b9f3f96ff70cf57f21eb4ccdbe96de7ec64504244e","tests/wasm/jscast.js":"d678058645d2d370c45ec5fd5bc9b94612b1e70035a9e0f524c134369f06fe1d","tests/wasm/jscast.rs":"bd9041fd4f74cd69435f4d4be019a887d680d7fac86134e42954e94d7c1c5cab","tests/wasm/link_to.js":"b371f4c82da171ce5a3e21a6de172cd1c910a4ff26e021d1a7ede5bfd7829c40","tests/wasm/link_to.rs":"1cbc53a58cf0fb693a8e775c94e3cbebc68f2355d98f4ce972abc42ffd62d014","tests/wasm/linked_module.js":"412bcf020b68e7e5511f4def869cc3384c1e98b923a9b82e25748b40b5b6e640","tests/wasm/main.rs":"ea1e4a067a3caaea2e4d7c431faaed1771319389c0ec795b103e5a26a63dbe8a","tests/wasm/math.js":"9deb196ab7ad3d5d1f98d7d0b6ee60cb125212a4a1281ba0141cc3713fdea892","tests/wasm/math.rs":"be9000d84c6b6b091455e3b20ee7f5a88dbcfc0d38db97fad3dd167970c4b4a3","tests/wasm/no_shims.rs":"83636fee1ae0ae5b98d76b7f62f637824e77edd7a55fb27749b1a88b3910d6f6","tests/wasm/node.js":"ec3a9500773c7f07a7bcf002e23aa3848be5208147c3d750281a1e1f6d899af1","tests/wasm/node.rs":"fe140900d7048353ce0e518a1e67dedb1928f0cf34c02514498184fd8aef10cc","tests/wasm/option.js":"0d0cba722045698e9621f2565acf854bf3085c8739622798085aaa6b58e3edbe","tests/wasm/option.rs":"d82123f7349e22873e636341a52e99e256213e77d4d7ab8450ba6379be2128b7","tests/wasm/optional_primitives.js":"37484639631e1c50bdc055a08babff18d4be9f7a9291f0f3395e1a7c519e5cac","tests/wasm/optional_primitives.rs":"502803cf27b78dd8a6c1d75ae954b71cc017f803486867a87c0474e5d53a6567","tests/wasm/owned.js":"645b47e87fe52e08fbc07951736ab29f4dbab20c051913dba6228b2a08bad0bd","tests/wasm/owned.rs":"32684e31c4f1d3641ea1384d6611bc291dfd0f6d104c4bf0e57742f572649210","tests/wasm/result.js":"78212259f886d864885eca7599199434bd7abec915a2e7fa3b73dfe63284e15c","tests/wasm/result.rs":"2aab9c8a7c05b44bbd99b40800fb6fd08dd2cb498740219c9defec059cd4a637","tests/wasm/result_jserror.js":"3ea04e68937f15d869535b3bb119d8886dfcde3c16c12c4a18a995f358552154","tests/wasm/result_jserror.rs":"d168239fc71078f23a820e8959050e15965b86be047ab17c19c1befa35a82b4e","tests/wasm/rethrow.js":"0a495a8d1b735277e18cc3fc3edf8bd2a72586441d3884134182e5052786ab84","tests/wasm/rethrow.rs":"59dcf192c9e85b0d98031c135d2aa2eda4902a2bc5b740a9ddf1e75dc9cdd23e","tests/wasm/should_panic.rs":"234929575bc55d9181d49938518888cb273bd5f3b1c9f826f94ee8956f1f5584","tests/wasm/simple.js":"3890fa19585d031821e8db80de06593e8e5ce83c9ba8214fe1cef319e9c14fbb","tests/wasm/simple.rs":"e0bb901661e63750b468ba530c4d3cb3a7fb3b3f1b13adba1b88c129688867db","tests/wasm/slice.js":"2e3c42c6ebeb832f42e99e4f251817bd13083eff0b7c45c46fb4d7ab2aa740cd","tests/wasm/slice.rs":"511eb693d0ac56bde149c37039fb207ee4f0b1b92db2a809306f5ac80d578dbd","tests/wasm/structural.js":"ac504a1dbb7222c70270530a284eec56ace0bc47b95e8f9331f4b2df1d28c3f9","tests/wasm/structural.rs":"dda0e9cea09b94dd84ae39d6cf0949aa305062b7a466fdcb53370f5ee9e3dff5","tests/wasm/truthy_falsy.rs":"b54206b376f7413c9cce1792df65f57ed1e97660b4be8d9486e9c6af00f6893f","tests/wasm/usize.js":"521714b75033d9e18117de2cae2cd690c477faa88daefbbc82a09e60f4e901a8","tests/wasm/usize.rs":"b97455844d1f7acfbae7fcc69ec0bd8de871201281e802173a62574b8f3d7983","tests/wasm/validate_prt.js":"a726a85f4805648d9e69c804a266bbedaed942228a1b3a46274a91bcb83eafe9","tests/wasm/validate_prt.rs":"cea3db07f10d2bf057af99b90655179371bccf1db67e7364d476b00ecbf24a93","tests/wasm/variadic.js":"30d3bb656c0eb29b69c7e653f3201b5210b8a78e962b4678336c4d9889182adb","tests/wasm/variadic.rs":"1cabd34ad64475cc705853a2b9a8f619f6aed6ee3f3d8179793f8198df1ac178","tests/wasm/vendor_prefix.js":"1424c7fea77fea13179a50030afeffdf4b277dcb6d7b1e5ce3eea681ec2c47f4","tests/wasm/vendor_prefix.rs":"eabd627e14e09ec637d7e7a5b0bccced7e3370203351e4ce8610a5c66fac502b","tests/worker/main.rs":"9b2202d6dc9ab33914de62b4e8dda4b727b518fab4accf9c8f51312224fb48c4","tests/worker/modules.js":"a407c81d2670309ed484adf98a2e522f6ea031b1286416eb7bf184df7433d5da","tests/worker/modules.rs":"7eeb46835d911868842a3e7434fc2c6d0e042943eb10e7ad76336065cdf18db7","webdriver.json":"41a86a9f78e1e520b2050e122da97c80a32e6e292e874fd8892e3eef1a75ed34"},"package":"5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73"} \ No newline at end of file +{"files":{"CHANGELOG.md":"9ad625861dc9c8f6457281e7d5ac563085b5458e188fb6b0e18858215d2b5dee","CONTRIBUTING.md":"aa138d76f5cb25bba1a6942a230373aaed6be73c619f945cc4657e13ba69f897","Cargo.toml":"dae7f0168f3ece72616595f4a63e6a1f078d24198bdf39abe0de002ed1ce90f0","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"8e0075aceb58e5db84b7debf46f7a3fde437573f46fe9aad6421a3a081575cbe","_package.json":"64c943903ffc064a2c5506e46fce690d7f566589d0d8e71804ec1638d1aabad5","build.rs":"95d57e593c411b82bf88819765d6422db2a65c1bf489b63f87e0aefeb721fc41","examples/README.md":"e5396e95d8130948e48b767ab505c46bc69f6ff3ebfe0d9709068cf42c250818","examples/import_js/README.md":"bb53d4a264e9a084effdc7a22ca7d5acca0207b411478b98782d881b7fcade51","examples/import_js/index.html":"f4825d155bfe0059aa182a506d6d076d1ba5f118e46365ac902b12f27a6c8c0d","examples/import_js/index.js":"d425b7b0636dc5c5046bc96e6bfe6ef3bb1503fa91c54f40ecb457a1b060ee5c","examples/import_js/package.json":"bbbfbfa1a62779e38ba30c920d27aefaaf10bf6add3a89a65b7d2b093c1fe017","examples/import_js/webpack.config.js":"fc314556d2f0c6266cde7c47afaceebe474be97c0401985a23d822ad9dd0105a","guide/book.toml":"d8cae5ae5fbeaab5b6852c64b975d37f51592a8e9eedba22c898672d9b11e9be","guide/src/SUMMARY.md":"26355c6b0e8391429736fc5515b03a0e160d792710c6765645aecff0cc9bd171","guide/src/_headers":"401cee68df5967f0aa509a1b978a83f06e8e830deca1433964703e7a1ac2c646","guide/src/contributing/design/describe.md":"3186f9795be894708788e50d2ee745b9bd73bc94fb3dce67f3f1fd5e7fbd3659","guide/src/contributing/design/exporting-rust-struct.md":"2ead6b67f241bab543bb96c80e90b63abd67822a7c94190d2f2d1c9809a59b87","guide/src/contributing/design/exporting-rust.md":"ad88a5e0fccafe6c27e5a8bd951cf3e2fee1846da77a665f255999d9dd5961a6","guide/src/contributing/design/importing-js-struct.md":"848d0b144b28a5ae1ca3760438e71b938cfb2ee350f5b902fd08c38a0a64e27b","guide/src/contributing/design/importing-js.md":"c949c8921c213ba21b08f705d4611304acba47b68c35484fe968a80194f3a9ab","guide/src/contributing/design/index.md":"3bcd35bfadc3fa81d26dcac23f2e2ab5c3e2874cb6a88d0d892c5effe535fb04","guide/src/contributing/design/js-objects-in-rust.md":"0a18922b509ed8a6cc6724b81af6e6d469b75b3796dba770949a8b59d8067455","guide/src/contributing/design/rust-type-conversions.md":"efd7ddcc55770b5a2b68d542fd6aa128a9d4f60eaa5477481a1827c11b17dec0","guide/src/contributing/index.md":"e5115ccd2403b929d65acb9626bff8d66e10d1eb625a023ea017f2271a3e49c6","guide/src/contributing/js-sys/adding-more-apis.md":"d6626d530fa5b73f045a20bf123d5e261ac2ca3bd64cbb80b655612f9b9a6276","guide/src/contributing/js-sys/index.md":"9c0864ca52e8699148e789c2a6ba2d3044ba2358d7106a1b7fd725d3720dbb54","guide/src/contributing/js-sys/testing.md":"d1f613c88793ffce61b2d77aa40e3a91a1de3c73ab9f8eaedfc39da16c93ad07","guide/src/contributing/publishing.md":"012c31c7037ca084d0c2a65c2dfc0be6fcbe5c118307e9efbb4f6f781ae48e43","guide/src/contributing/team.md":"a3f993cb1afeee767e85077d135b1ea08850c433a69c436ebe6b7a48124ed945","guide/src/contributing/testing.md":"b6d45f2a177525e1fd9b7c8a0d47f0bc156a9327795bcb4d96716851f94ff2db","guide/src/contributing/web-sys/index.md":"6b4d5e00cbbcaab29295a3bd60e90b7f72b118758966622a307d9222488707c1","guide/src/contributing/web-sys/logging.md":"ee960ec9adc174183fb349acdbf5fc647b6f9a290022be9b118b9de37b8b5687","guide/src/contributing/web-sys/overview.md":"e6179317f75aa8e836e3c803f5d814e87119763709eea47b04cebc86c089d80a","guide/src/contributing/web-sys/supporting-more-web-apis.md":"a3817d09c6cdc3cb28a1b77cdad5e4436ab5bc37f9d681b1e495815ca91de85a","guide/src/contributing/web-sys/testing.md":"77f8e4b45bd0e27676dd503474bc32f91672b23c6ab7127a4f5b828dc8ea40e4","guide/src/examples/2d-canvas.md":"44a0eb82ec3398ee63a6df5aab103f1b002082eac2d129f656d8519cbc0829e7","guide/src/examples/2d-canvas.png":"b202cd79b20c00d49c40d71225eefea99306015858a432ceb7592d53c15300f7","guide/src/examples/add.md":"8dac740d6a4c499d868c29d8426d113da9cdd6ef22bf8084b8cf8c1de513b09c","guide/src/examples/char.md":"93f94a1b670322d0dc21b46d749909c414f9f254e2dd97afd8afe8cb0e5ab908","guide/src/examples/closures.md":"669dfc47a670271d7ce7a3bd2c08620b698b01ea8b2a7b1cc2047a77e7617130","guide/src/examples/console-log.md":"6552f4d766291cddc0eade75e4f64de9f10e00b89a0bedb1b15dcf7baa90b6e0","guide/src/examples/dom.md":"44ad74370b3727ec98f958273c639e767f2ae5b75e96ef53e74be1833a630272","guide/src/examples/fetch.md":"0f9d08e240bc5ced13ab154182aedef7fa7b00cba784c65727aa15be27f86d7c","guide/src/examples/hello-world.md":"d5f4d830c316a91e951cdaeab5cb23ae47dbc910b05de849e67bef1ea709564f","guide/src/examples/import-js.md":"0480a6aa32b1fdc1347cb3d0c4f2a006caeb33c75ed21eb78ad800f012cbc2c6","guide/src/examples/index.md":"4e629f42d7bfb52bc35856b6e21c3aa7433563482697212d7b54f1bf619b56ed","guide/src/examples/julia.md":"0cd4ae1de24d657d7869c984dec61cc8b796621365be633212bdb2a6d57ce727","guide/src/examples/paint.md":"06c6c04f121080e0e5600b4ad300df9e93b5d4b6342f42c421e6dec1f2955ced","guide/src/examples/performance.md":"de888713cf0a047bd4a28a1ca890be51d99b6aaabc9a2b134280b768a7148377","guide/src/examples/raytrace.md":"6769cf3b7bd14e9814e751927fde8c5acb443c5e82758285a1ee4f91e577a870","guide/src/examples/request-animation-frame.md":"26eef6b203acc0b2667d9c4380c39a44eb4b97991efeded9ca32cc9ab454e993","guide/src/examples/synchronous-instantiation.md":"c2f887e4754535c453d22438c3179d71d2468d8994a61330a362132c73157ef1","guide/src/examples/todomvc.md":"b872c5631eae969368d147342fca16dadb6f0412f8922230c27271370e9d3d97","guide/src/examples/wasm-audio-worklet.md":"dda392cb5beb75423bd402661d0de85de7acf5098e38ecf167533774b5b9977a","guide/src/examples/wasm-in-wasm.md":"5439a690e7107736e6f8b92e475f0a45e83ab9a1e5a0fe02e8f6dd93372590c6","guide/src/examples/wasm-in-web-worker.md":"8877a952ba93bbf52d85acb7a6a38d318e5638c36b86338156c4881cc704394f","guide/src/examples/wasm2js.md":"48f953dfa1b17b68e5d983231e991797e32e9bc22b9c3db72c2d055e08449a00","guide/src/examples/weather_report.md":"184bf64d58820b032a80c738050e7b2cd0042eb722f61c7e8a3c531239f72db2","guide/src/examples/web-audio.md":"32bb18c9e4f167614ce3fb61d1d04265449f88da40949834b50baf9e37063fbd","guide/src/examples/webgl.md":"15570a0a081c2301981a1fbca0bd39dfcf35221c64ddfb8e8f4477660658cb08","guide/src/examples/webrtc_datachannel.md":"47b06b1b00c41f048fad3c2206399cae2d8dbd90b6d83953c138826f11677eb5","guide/src/examples/websockets.md":"704f9d5c1d13426e6e64e132cb0204be3c10a54dbfa5f1c834adc4efb4a1b8d2","guide/src/examples/without-a-bundler.md":"c25c28ae01905615bfbfb88b43563e04db76cc0d87469b63453053f62d8a4930","guide/src/introduction.md":"057e81f8f62d8647e51d1269bdb5788654be2e22fea23d155ec5a15bbf8bae1d","guide/src/reference/accessing-properties-of-untyped-js-values.md":"a91e3eb706ddd15628072978906e2faca31560de616c0630316d9f6eff6b55bf","guide/src/reference/arbitrary-data-with-serde.md":"b281146412f6bda893f146e84721677f003cad57af941552c2faf534b61b2d98","guide/src/reference/attributes/index.md":"12b57ebbd0c9ba42d9f10d752c9943d9beec90d659d1b1ff9e9bfea02572a2c8","guide/src/reference/attributes/on-js-imports/catch.md":"da230e6986ca29f1e82313b82275ab9c3b2144906271cf82b27772541d781d84","guide/src/reference/attributes/on-js-imports/constructor.md":"89f8be11c567b4611c84209b34351238553d5360d7f7665ea25332e1544c5b99","guide/src/reference/attributes/on-js-imports/extends.md":"84ece37398ba0df66f890982315f082c52b5f027e03c20527755abe610c2567c","guide/src/reference/attributes/on-js-imports/final.md":"2ded2c23194cdb5f0b064a2114cbc8a6a1c1573363d797f162c4683bb2f1c21d","guide/src/reference/attributes/on-js-imports/getter-and-setter.md":"27f3c2738688a43e611524e5e3ab7174a1993026a69098b75780a388aeb5e745","guide/src/reference/attributes/on-js-imports/index.md":"2219a4514fe9597cbbe6c46014b57c38f1e85f3d0775a8a7880f50858cb13633","guide/src/reference/attributes/on-js-imports/indexing-getter-setter-deleter.md":"11d5c03f922294894fe0147fae96e04b26a5adb36ce91296e52729a9fe5931c2","guide/src/reference/attributes/on-js-imports/js_class.md":"d51c5f05b71bbf6b6ec8e0c36314ae299fd7eb07be989e721b79b599405b3486","guide/src/reference/attributes/on-js-imports/js_name.md":"12457466f3510256a51a78f52b09f7cb1c0b0ce3ef636e028cd2c372fa9e8738","guide/src/reference/attributes/on-js-imports/js_namespace.md":"acaccd162a982c1c17b659ce5daa1d5a0d184b9b07728fc5bb17a89f327ffafa","guide/src/reference/attributes/on-js-imports/method.md":"d54246efce5d7a104702439ba509bcc5bfbb0b57253edebdb696617daca80bcd","guide/src/reference/attributes/on-js-imports/module.md":"b47cd5ccbb69955f1d47101accc96fcd562abecbf7e34826f7f3c585d6b9dad0","guide/src/reference/attributes/on-js-imports/no_deref.md":"7d58bb3b6f768e38b949727abd1ee621ad09ebc537f83a8a20d0eeddf3771b95","guide/src/reference/attributes/on-js-imports/raw_module.md":"f363e5f3bc401b7e350eeec49cffde85dfb2346d597f38d98993fe5bfb9ff649","guide/src/reference/attributes/on-js-imports/static_method_of.md":"d5a5d9623ee55097f26e190b478e75f2e7d2ffc30e51ec647f39933d3d4e3b18","guide/src/reference/attributes/on-js-imports/structural.md":"364e01a5792029e9a5fa582375736efcee006352834ee273d218da89b77dd8bf","guide/src/reference/attributes/on-js-imports/typescript_type.md":"9cae454e9134ca1d14e2af3c732f370335332c615bf03ac49e525ff6f1877cbc","guide/src/reference/attributes/on-js-imports/variadic.md":"1ecf00149be472e3111f188c053092f3274fb33453414516a305084d8e92c4df","guide/src/reference/attributes/on-js-imports/vendor_prefix.md":"47a8d47e0cd745cca697f6d944e145f02695ca422255c3d6e1c9b2b719994b1b","guide/src/reference/attributes/on-rust-exports/constructor.md":"d3878fdb36174e5662ccfdf0fb027ef8175a7f8ca14ccca875217e03f5d5be1d","guide/src/reference/attributes/on-rust-exports/getter-and-setter.md":"464a2d41a791bd8ba5a8b1c4aa64b2f865c42b98a2d1289bb65e766e98a1b56a","guide/src/reference/attributes/on-rust-exports/getter_with_clone.md":"11a04dba4d66c19be0e234014d21ccf9cd0b76169b723e90ceb81d719478f283","guide/src/reference/attributes/on-rust-exports/index.md":"9fe778a0dd013a874db484cb22b1d9867bfe6d69cfbbe5cfeaa8ab78cf19daab","guide/src/reference/attributes/on-rust-exports/inspectable.md":"52fbcfdb83c426430a95692d566a4709255e25b24be5704d7378a4196a8c5908","guide/src/reference/attributes/on-rust-exports/js_class.md":"f4c0d8e8021001578f7d300e88c438d1a7806c17cc0d8acc3b4134922a75affc","guide/src/reference/attributes/on-rust-exports/js_name.md":"77f035b6391b9e44f254a411ba18687c5fa6110e276be73b5ea347701c8dad42","guide/src/reference/attributes/on-rust-exports/main.md":"d1a42470fb0457b3471e96ba22ca270c1cfc9d5fa781240a9d8b1aef32641ff8","guide/src/reference/attributes/on-rust-exports/readonly.md":"a5da847ad36557f03b1c79a83d14c219dce914021266133c204260bc041b9b89","guide/src/reference/attributes/on-rust-exports/skip.md":"b9972241b8d473d1a46ef3c2861065ca296cdc923883c404f19f1d859bf914a6","guide/src/reference/attributes/on-rust-exports/skip_jsdoc.md":"6c400bb6dac1083449758448e5e7a576d40f371592cd597ea95ec441fefe19f8","guide/src/reference/attributes/on-rust-exports/skip_typescript.md":"1622c29b0d93a884bd0b5b2a62107a594e2919758c80592566e7786efe788b89","guide/src/reference/attributes/on-rust-exports/start.md":"db6cfb9593b7af1a95112c135c202d00c609651df16abc174d2f38310809ad08","guide/src/reference/attributes/on-rust-exports/typescript_custom_section.md":"6dd69f15b6f6f632880b7a65cc49abe8f4f95fdead753c576d81a3268dae4985","guide/src/reference/attributes/on-rust-exports/typescript_type.md":"1960cbeea1047a0fdb936e3af4556ae805e9777323076b9f3820cb3986f27de6","guide/src/reference/browser-support.md":"177fff4ee6a68c85f045cec47bc7aa40de66fc95f8cb59128e8ef2d6972dbd7b","guide/src/reference/cli.md":"809daa3dbd7da7aa01786acd9602bfb4f81546c010568bf1f56d95eaac7dc29e","guide/src/reference/deployment.md":"1954466cd2ac6c5326258364f6390b10cee9c2729e7c2779f2a50f950c7c9523","guide/src/reference/index.md":"c603c3a7f265afb7c7b5eb391b32f6115f8842f3f422fd3730be4f90c4796bc4","guide/src/reference/iterating-over-js-values.md":"ec00f09516eb7de98bf7296f44b6aa9ceee3fae1dcdb7cdf8f36963d45b7ebeb","guide/src/reference/js-promises-and-rust-futures.md":"5f0c0b990f5b55c8d9485f7cc66a617f79cc232705562f306af97785c7ed1f79","guide/src/reference/js-snippets.md":"dff5adcbf66f06322e606c672ef070c2a0375f1ae592ca8a9da36a50324735cc","guide/src/reference/optimize-size.md":"c10abc1ea0902c9a57b74808bcf75bf092c0c2bb4082962b85d18df7593602c1","guide/src/reference/passing-rust-closures-to-js.md":"aa18f75ffd4b7779a2699b1bf969245ec0e1a70b24abe61e8877c2eb65f6ef60","guide/src/reference/receiving-js-closures-in-rust.md":"fc9c80ba5e1a5f243a66f68caba27e8103652aeac3765a9fad2d0e16113fede3","guide/src/reference/reference-types.md":"91d178b7fe2ec82eec4d8926a08b39ac16898172d6f65aee84347c6918033c67","guide/src/reference/rust-targets.md":"467d5cf7eaa1d4b89f9f5b2248cdd1a10340ca1db263ffff5c483ce10dcfbf54","guide/src/reference/static-js-objects.md":"930288fc463d16a46a6546f5f65af21ff6e4b94259d9a1e8bca9d660f9770604","guide/src/reference/types.md":"859123f51fa932fa37d7e47cd5c46956929793bd3accea050d3be516080ed78f","guide/src/reference/types/bool.md":"e954d93ec5096837d4dd2db3f23e71c14483279e347ca8908ecb49aded6e497a","guide/src/reference/types/boxed-jsvalue-slice.md":"634e51ce92770e6078ca3303be946272af3f092f2703c90601ed8f9092c69a53","guide/src/reference/types/boxed-number-slices.md":"1a217a68ff549f4208f99863d6616521c9d466542c1156bcc2be7d3a73e4edd4","guide/src/reference/types/char.md":"01f2f7bdb25a9a52edd93dcbbca6a29269a8d5adf6cb94dcadea29a7aace22f4","guide/src/reference/types/exported-rust-types.md":"d2f601d7d39ae92326c5624e1e2a2795f1f47accb92ec030c987b6c709681906","guide/src/reference/types/imported-js-types.md":"c82dba871a26afb7b90ceec59892adfec9bec550665a74d190a4fda639f61d5d","guide/src/reference/types/jsvalue.md":"46d74da47f8a517249de4dd096351c10d658d9c3535950a34c1fc5d5b42eb2f7","guide/src/reference/types/number-slices.md":"f380258fc058527c7dd6f49664a4e9dff69f0b03d626071aeb61efefb2a0b646","guide/src/reference/types/numbers.md":"cce95c07be08c1f16327fd4c7e79b7c480db9cc95e2b07514d31e51bd6122101","guide/src/reference/types/pointers.md":"3710b736f790a97a325b1883d5fa8104c16365446ef702e9dd29bda74699043e","guide/src/reference/types/result.md":"78be87e86c35d2bbc1b863217c1a7592af9f2c699902f44e22d1bc4b1c0664c0","guide/src/reference/types/str.md":"6cc086b02ae3d3565678e69d91dbf105f1f310009097a37fad4c812e25d4b7c0","guide/src/reference/types/string.md":"9e42298135e0aec11bb924e3a2b5002335cfe290240b48db12dc981156177cd0","guide/src/reference/weak-references.md":"8dc6ca26c478fceff12e374e11e2f01fdf5b6a88b7302d449d4336859f4efe8a","guide/src/reference/working-with-duck-typed-interfaces.md":"a23f1f98019fed2060e1fbce954ec457e77a3a17524f34ca861d256d2ad4b6ef","guide/src/wasm-bindgen-test/asynchronous-tests.md":"c24c381b719b4bd7b0c181da1db59170e822c142eb22f95c4a6eeb8fd36df3ab","guide/src/wasm-bindgen-test/browsers.md":"4a32d955e907134d71bb8cacb6a8a3eb290622156251f50f6a3946d799314e44","guide/src/wasm-bindgen-test/continuous-integration.md":"5865990ef231b3c99a9c1bc18f7b7f054a29b77ac7b671fcf1cd6bb4f4304ae8","guide/src/wasm-bindgen-test/index.md":"64fbcd222c3c597109d2717a3574abf2041ff325c26ee07d58c4cd7ba1c1f8ad","guide/src/wasm-bindgen-test/usage.md":"a1da64eaaf8fe9bea366724e08a4ba63dc984f86a28cc393fe00dc394ab244d6","guide/src/web-sys/cargo-features.md":"0e50067a7a46cee3d1b21a2690aabc539379cb1452de377ebaa0eaa4e5e587b2","guide/src/web-sys/function-overloads.md":"90a08bb955f7c79e573f83c31d5e7431ae1e3ad7001792ff8ff52e4299364fcd","guide/src/web-sys/index.md":"345499d0840fd23a2e5eb5ac497665decbb3f836fe9f4f88301ae4b5fbd8d44f","guide/src/web-sys/inheritance.md":"8f18af20b930497e2fae4a266dd27e317d1ea3510266c21b32f351354b495ff2","guide/src/web-sys/type-translations.md":"687ef5e4a3961fddcb94d24f69abec0ea64f6df306f4593974b69589215980b1","guide/src/web-sys/unstable-apis.md":"e74c3e72136d6906dd60258a27f34e1ea4612e7c8e95662596475dc557151cfb","guide/src/web-sys/using-web-sys.md":"523e16af6e27703a4a0582568bc97710350222af20801907268d2d8c197fb667","publish.rs":"6352715cf06a9e373a141e34991fa97ec5bdeb0ce7d623a4fbbe9448ef1bea35","releases/friends.sh":"f896ccdcb8445d29ed6dd0d9a360f94d4f33af2f1cc9965e7bb38b156c45949d","releases/release-announcement-template.md":"fcb3c75cdb8d5d6ce8a198f5570c967313f751d1eef0790b34a518772b2e8a38","src/cache/intern.rs":"b78abd7502ad069bbeb61073d1972c717a469849222037565b50514192c187a9","src/cache/mod.rs":"8989143b55160dbc142cb20c6e066cf0a3f70d6c97fbc9aa0fac59bd62bd865b","src/cast.rs":"da53f21aa485c0dae184350d2693ab41e3fc7a34fa300c19ad718f2b7fc2d42b","src/closure.rs":"489602405b52a5cd6b2e26f0e3a9e8d18497a939ab4cfb2e16c169cdc956f460","src/convert/closures.rs":"34d3be752366270170e4a46b7ed81659417fc3596b93a8d004959cfae6ba91b5","src/convert/impls.rs":"53b99adb5f6c50b19bf1936952693e226c0e86b703c20ff29859ad9fa25996ef","src/convert/mod.rs":"566ffd1f546afdb8d24c6c0d6faa00a28596a67ca6f2f39e9485add54400443c","src/convert/slices.rs":"023631e5419a6940fd50dd3a9f13725bccdb2918c78b86639202207d3ef707f3","src/convert/traits.rs":"6e6fbea4303547ab7c727b70bda964ecaa9b25396faa0b5963efee85b8737a94","src/describe.rs":"f17b1d44ea933d892e7dcd5b92f191434d8772cbcfd65468e0a6c7fd0e77f910","src/externref.rs":"2c26fc2a85a04d131c70d14a425ff54d961a471fb2b53c378d7f5e3ffc6b9085","src/lib.rs":"08c3483a27953c47bff48e756b0d47df4c809fa268c16d5d30ab83009a3f6abb","tests/headless/externref_heap_live_count.rs":"41b2758762c91bd2d05995b1b8989651a6bf2e586ffad5597ff63f6d2dc6d755","tests/headless/main.js":"6de0a19b91330e9bc68334c4f1fa11c1cd6bf273f5ea3e470933ad800c962679","tests/headless/main.rs":"d86245fdd476cb6c275c0649d76fd348ab55b7952ece325c1ed4ec00051a1f73","tests/headless/modules.js":"a407c81d2670309ed484adf98a2e522f6ea031b1286416eb7bf184df7433d5da","tests/headless/modules.rs":"74f77f88bb5280862c06087d78c48ba930736e58db9a1e6c80450bb0e032b789","tests/headless/snippets.rs":"baf9d3c68e1b567fcba4e073cc0d24a8f039955e10dd1275e4a389574ff556d7","tests/headless/snippets1.js":"8bd0c367fdbc61f509728255750094bb36200a1aea74079611ad7cfa9c5f3f28","tests/headless/strings.js":"fca2d7a1afae31663607f956134a4f447aaee0f85d828addc3c4c1440f2e18e5","tests/headless/strings.rs":"4a64d8a4f9329a282d0f87408c0645ded71a7d023eaad40a32eaf60886a08375","tests/must_use.rs":"cae67a8740cd2c969a6b33316cd5036639048d9bbfecf55a5f45faaa624de1d0","tests/non_wasm.rs":"d2cca0b81824ac392f55b8d583d2f361ac11bed892968113e33fb3148572b853","tests/std-crate-no-std-dep.rs":"47f0e32bad7b9b11ca77d66d904eb3408c3528732899479039fb6db4c6e9ed9e","tests/unwrap_throw.rs":"79f05fa37249cea08689592d53d856019a90fd1b72c41413f7fcda5cf5913356","tests/wasm/api.js":"daf4b7e2b76b718431235eda5e221dd53037fb6bebbec6023c7e3fd2b806f763","tests/wasm/api.rs":"12219ffafbb57ba8ed315c56f5e18de412df84757e002ae11cb9d2beec13b0e3","tests/wasm/arg_names.js":"0d7de3801257e18756a974bdd2950d2fb06755f7c0d1c681e03b56d97e828e34","tests/wasm/arg_names.rs":"decd8f71a58ebf662a586b7f19e41f6666782df0da74a8a2c69b7a504661dd79","tests/wasm/bigint.js":"b6d045afbbb7d5e8723b41ee2e9c22357c8c4c4aed804bbca2a9b42a19906354","tests/wasm/bigint.rs":"5a7e0e6e6753a5ce08c199334fd89f1cfeabc1305301d988d6f748e001ccfa2c","tests/wasm/char.js":"6f307035f2689f0827726503f201f8fd591100ff051a55bda23ddcaeaa2902f1","tests/wasm/char.rs":"44dc134f9057e6c91da32c7fdba5ba10785507ced161c07267548ee08308e6c0","tests/wasm/classes.js":"bfe8660c25933fa1cec1301db9a790b3df3d5a0f6911733ad2544a26b43dabae","tests/wasm/classes.rs":"e2df4a27ef2dc5b986c88206dc1067fbb762d4393d5d343d3edf2d1ac3f40fdc","tests/wasm/closures.js":"6df2da8bad116c9ef244f35f4f14d1fd432e6faf43df30882c6464a521cc606c","tests/wasm/closures.rs":"6ca1967c2a738034798b78b8a407b3c7db1648b4a544ab2399048bf362c4ccc7","tests/wasm/comments.js":"2c3bf2e79ecc33f0fba33d13a91a1ae9390f9f7a466af8eb215636662e20462a","tests/wasm/comments.rs":"5a0068fe3e214c07da92a46b6e45a2771fbd8e04f14cb7802f32082b87a459a0","tests/wasm/duplicate_deps.js":"2226e4f65525c545ab45109879b16b2a92341b440178e75d3a9efb3ed10f7b03","tests/wasm/duplicate_deps.rs":"3a91569e54f56e178dc164f2d2b8537ec6a10b3161c23e1cc8e552805cd868f4","tests/wasm/duplicates.rs":"a2b4a7960e8a7c9b3fda943e8aadb7cbc0ba8fa1a6956baf40ba2f129bd591ee","tests/wasm/duplicates_a.js":"d3d685e95a54b911c2b9a64f7c0f245e3e492491368355044ae2cd12c3332044","tests/wasm/duplicates_b.js":"cd6c87905a5c5514239bba52a03e6c151d79a57a477f52a073b61ef18c98f642","tests/wasm/duplicates_c.js":"93399409996d182b5fe02548d3c5c3e1681939629e0261d6f19f8c1ee3b08dfc","tests/wasm/enums.js":"7b37ce390aba76477e4d54c5214624cfc5eec49e0f88ef6f535f06f23527864f","tests/wasm/enums.rs":"1537fda37a051340722c29cb5aadc9e1819a2e609f2569ca4fd972308d03fc7f","tests/wasm/final.js":"cfa7c496291f08b98f0406190ee4deaab9ade890d65ada4c223a76135e66f619","tests/wasm/final.rs":"25b0a85e87686e3f7a7a44e3ac25402d504eec7f9813a74ffd63c5f4428ee0ff","tests/wasm/futures.js":"175745daafcaed4cc0233809f4829228528c87030459645e8493b013cd3e9f98","tests/wasm/futures.rs":"24af063658319fc76d89a30a9582e885465dfde520c6eae34eb5b8b668aa05cc","tests/wasm/getters_and_setters.js":"8ba2d939aab232074860cdf1e01d1c58faee49a31ef35b585c962aceccb870a5","tests/wasm/getters_and_setters.rs":"e25a2d026375adda68b4591f2802ad941e0a212fca8d7ff6cf020eb5da5fa5c7","tests/wasm/import_class.js":"d1bd1dc7df5bfde686bea6fbcd32db6009b6853712cafb446af263fdebb1fb78","tests/wasm/import_class.rs":"0678cb9272a28f818a54f182e8f229235f6bc79e220738dbf68561bc19d7e0de","tests/wasm/imports.js":"4069b7cf12ae0cca30a1e92750d0715e782a5c795ff21c0d5aae738f726ae8b1","tests/wasm/imports.rs":"56cb87c812c1fb3f6573ca166caa483e97380433d10b1c86fc1237a191630fe1","tests/wasm/imports_2.js":"ab251fc0a0a1921c60d316160bc120fd97da3c3753804174cfda2f08ff43208d","tests/wasm/intrinsics.rs":"1eac40553375d1e5250a9242df19837d1b448296d53ceb41f842c80996e958e9","tests/wasm/js_keywords.js":"d247be675cc73540fea4b2e50bb2b7fcedb2b0d511d85be6fb646876d3025562","tests/wasm/js_keywords.rs":"6944d856346b528c321ac24b1f986e4858d22b37f8f24ad0d393fe7c4ac079d7","tests/wasm/js_objects.js":"a2be00dab58716e4cbbaeba4da8512ba924c39d3f1cb405ba769ab8a780ed7fc","tests/wasm/js_objects.rs":"86f77308ffacc9337d21f62671ce269e723468a53404d0679da43e5e95c90135","tests/wasm/jscast.js":"d678058645d2d370c45ec5fd5bc9b94612b1e70035a9e0f524c134369f06fe1d","tests/wasm/jscast.rs":"bd9041fd4f74cd69435f4d4be019a887d680d7fac86134e42954e94d7c1c5cab","tests/wasm/link_to.js":"b371f4c82da171ce5a3e21a6de172cd1c910a4ff26e021d1a7ede5bfd7829c40","tests/wasm/link_to.rs":"1cbc53a58cf0fb693a8e775c94e3cbebc68f2355d98f4ce972abc42ffd62d014","tests/wasm/linked_module.js":"412bcf020b68e7e5511f4def869cc3384c1e98b923a9b82e25748b40b5b6e640","tests/wasm/main.rs":"ab59340b8cc5d49f4e92df19d3ce04eb89358f481af476fc61e731e5e0c6e6d1","tests/wasm/math.js":"9deb196ab7ad3d5d1f98d7d0b6ee60cb125212a4a1281ba0141cc3713fdea892","tests/wasm/math.rs":"be9000d84c6b6b091455e3b20ee7f5a88dbcfc0d38db97fad3dd167970c4b4a3","tests/wasm/no_shims.rs":"6c44ce90e1fcb8d41a7c2d369ce7a2735ba5ce799dcf07b41cbc3ccaa2f27a6a","tests/wasm/node.js":"ec3a9500773c7f07a7bcf002e23aa3848be5208147c3d750281a1e1f6d899af1","tests/wasm/node.rs":"fe140900d7048353ce0e518a1e67dedb1928f0cf34c02514498184fd8aef10cc","tests/wasm/option.js":"0d0cba722045698e9621f2565acf854bf3085c8739622798085aaa6b58e3edbe","tests/wasm/option.rs":"d82123f7349e22873e636341a52e99e256213e77d4d7ab8450ba6379be2128b7","tests/wasm/optional_primitives.js":"37484639631e1c50bdc055a08babff18d4be9f7a9291f0f3395e1a7c519e5cac","tests/wasm/optional_primitives.rs":"502803cf27b78dd8a6c1d75ae954b71cc017f803486867a87c0474e5d53a6567","tests/wasm/owned.js":"645b47e87fe52e08fbc07951736ab29f4dbab20c051913dba6228b2a08bad0bd","tests/wasm/owned.rs":"99af8eb8c30485b028f37d24352e2db747a425a00ebfed29e02400d87c756f32","tests/wasm/result.js":"78212259f886d864885eca7599199434bd7abec915a2e7fa3b73dfe63284e15c","tests/wasm/result.rs":"a4a4486d3edb6e242d32a9f12916a6cb5d38e07f646f69969ece6838a351448c","tests/wasm/result_jserror.js":"3ea04e68937f15d869535b3bb119d8886dfcde3c16c12c4a18a995f358552154","tests/wasm/result_jserror.rs":"ae4cbd3362841d070722f99fa0dadaf3233661803c73c65a9e63746b58a72134","tests/wasm/rethrow.js":"0a495a8d1b735277e18cc3fc3edf8bd2a72586441d3884134182e5052786ab84","tests/wasm/rethrow.rs":"59dcf192c9e85b0d98031c135d2aa2eda4902a2bc5b740a9ddf1e75dc9cdd23e","tests/wasm/should_panic.rs":"234929575bc55d9181d49938518888cb273bd5f3b1c9f826f94ee8956f1f5584","tests/wasm/simple.js":"3890fa19585d031821e8db80de06593e8e5ce83c9ba8214fe1cef319e9c14fbb","tests/wasm/simple.rs":"79637e64b92c05f6b44b8d5ffe9b6cc014c9408dcb446a4a4de2a2dfed1fdde8","tests/wasm/slice.js":"2e3c42c6ebeb832f42e99e4f251817bd13083eff0b7c45c46fb4d7ab2aa740cd","tests/wasm/slice.rs":"6a70478061ed1abc92b30c3a72ac507ac5a533f90c9830a233458b25626be4cb","tests/wasm/structural.js":"ac504a1dbb7222c70270530a284eec56ace0bc47b95e8f9331f4b2df1d28c3f9","tests/wasm/structural.rs":"dda0e9cea09b94dd84ae39d6cf0949aa305062b7a466fdcb53370f5ee9e3dff5","tests/wasm/truthy_falsy.rs":"26ef766eb5c3dcc7f507c519b6ac4a37b3ad901f3ed6f5274307c12e549b5fec","tests/wasm/usize.js":"521714b75033d9e18117de2cae2cd690c477faa88daefbbc82a09e60f4e901a8","tests/wasm/usize.rs":"b97455844d1f7acfbae7fcc69ec0bd8de871201281e802173a62574b8f3d7983","tests/wasm/validate_prt.js":"a726a85f4805648d9e69c804a266bbedaed942228a1b3a46274a91bcb83eafe9","tests/wasm/validate_prt.rs":"cea3db07f10d2bf057af99b90655179371bccf1db67e7364d476b00ecbf24a93","tests/wasm/variadic.js":"30d3bb656c0eb29b69c7e653f3201b5210b8a78e962b4678336c4d9889182adb","tests/wasm/variadic.rs":"1cabd34ad64475cc705853a2b9a8f619f6aed6ee3f3d8179793f8198df1ac178","tests/wasm/vendor_prefix.js":"1424c7fea77fea13179a50030afeffdf4b277dcb6d7b1e5ce3eea681ec2c47f4","tests/wasm/vendor_prefix.rs":"eabd627e14e09ec637d7e7a5b0bccced7e3370203351e4ce8610a5c66fac502b","tests/worker/main.rs":"d9b95299c50c40ee7a5035710c95846e33ed7f52bdfd75c4aaadc4691ad97dd5","tests/worker/modules.js":"a407c81d2670309ed484adf98a2e522f6ea031b1286416eb7bf184df7433d5da","tests/worker/modules.rs":"7eeb46835d911868842a3e7434fc2c6d0e042943eb10e7ad76336065cdf18db7","webdriver.json":"41a86a9f78e1e520b2050e122da97c80a32e6e292e874fd8892e3eef1a75ed34"},"package":"7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342"} \ No newline at end of file diff --git a/vendor/wasm-bindgen/CHANGELOG.md b/vendor/wasm-bindgen/CHANGELOG.md index d6db092517a5c79a88c958856b795d1f7760ba86..97b1f01ad798eafded332680c057f05222f244ed 100644 --- a/vendor/wasm-bindgen/CHANGELOG.md +++ b/vendor/wasm-bindgen/CHANGELOG.md @@ -1,6 +1,70 @@ # `wasm-bindgen` Change Log -------------------------------------------------------------------------------- +## [0.2.87](https://github.com/rustwasm/wasm-bindgen/compare/0.2.86...0.2.87) + +Released 2023-06-12. + +### Added + +* Implemented `IntoIterator` for `Array`. + [#3477](https://github.com/rustwasm/wasm-bindgen/pull/3477) + +### Changed + +* Deprecate `HtmlMenuItemElement` and parts of `HtmlMenuElement`. + [#3448](https://github.com/rustwasm/wasm-bindgen/pull/3448) + +* Stabilize `ResizeObserver`. + [#3459](https://github.com/rustwasm/wasm-bindgen/pull/3459) + +### Fixed + +* Take alignment into consideration during (de/re)allocation. + [#3463](https://github.com/rustwasm/wasm-bindgen/pull/3463) + +-------------------------------------------------------------------------------- + +## 0.2.86 + +Released 2023-05-16. + +[changes](https://github.com/rustwasm/wasm-bindgen/compare/0.2.85...0.2.86) + +-------------------------------------------------------------------------------- + +## 0.2.85 + +Released 2023-05-09. + +[changes](https://github.com/rustwasm/wasm-bindgen/compare/0.2.84...0.2.85) + +-------------------------------------------------------------------------------- + +## 0.2.84 + +Released 2023-02-01. + +[changes](https://github.com/rustwasm/wasm-bindgen/compare/0.2.83...0.2.84) + +-------------------------------------------------------------------------------- + +## 0.2.83 + +Released 2022-09-12. + +[changes](https://github.com/rustwasm/wasm-bindgen/compare/0.2.82...0.2.83) + +-------------------------------------------------------------------------------- + +## 0.2.82 + +Released 2022-07-25. + +[changes](https://github.com/rustwasm/wasm-bindgen/compare/0.2.81...0.2.82) + +-------------------------------------------------------------------------------- + ## 0.2.81 Released 2022-06-14. diff --git a/vendor/wasm-bindgen/Cargo.toml b/vendor/wasm-bindgen/Cargo.toml index 153c3b6bbccb5ab404d9ccabf472ac2a808fa1e8..7b21e8af1002a249da6200b943f113af1e91b041 100644 --- a/vendor/wasm-bindgen/Cargo.toml +++ b/vendor/wasm-bindgen/Cargo.toml @@ -11,8 +11,9 @@ [package] edition = "2018" +rust-version = "1.56" name = "wasm-bindgen" -version = "0.2.86" +version = "0.2.87" authors = ["The wasm-bindgen Developers"] description = """ Easy support for interacting between JS and Rust. @@ -43,7 +44,7 @@ version = "1.0" optional = true [dependencies.wasm-bindgen-macro] -version = "=0.2.86" +version = "=0.2.87" [features] default = [ @@ -63,16 +64,16 @@ strict-macro = ["wasm-bindgen-macro/strict-macro"] xxx_debug_only_print_generated_code = ["wasm-bindgen-macro/xxx_debug_only_print_generated_code"] [target."cfg(target_arch = \"wasm32\")".dev-dependencies.js-sys] -version = "0.3.63" +version = "0.3.64" [target."cfg(target_arch = \"wasm32\")".dev-dependencies.serde_derive] version = "1.0" [target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-futures] -version = "=0.4.36" +version = "=0.4.37" [target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-test] -version = "=0.3.36" +version = "=0.3.37" [target."cfg(target_arch = \"wasm32\")".dev-dependencies.wasm-bindgen-test-crate-a] version = "0.1" diff --git a/vendor/wasm-bindgen/guide/src/contributing/design/exporting-rust.md b/vendor/wasm-bindgen/guide/src/contributing/design/exporting-rust.md index 68ca55430681c56a791cc8cfe8a382cfbe0a82c4..58491b34d4a62352f98e71477c9534d6b863f636 100644 --- a/vendor/wasm-bindgen/guide/src/contributing/design/exporting-rust.md +++ b/vendor/wasm-bindgen/guide/src/contributing/design/exporting-rust.md @@ -33,7 +33,7 @@ import * as wasm from './foo_bg'; function passStringToWasm(arg) { const buf = new TextEncoder('utf-8').encode(arg); const len = buf.length; - const ptr = wasm.__wbindgen_malloc(len); + const ptr = wasm.__wbindgen_malloc(len, 1); let array = new Uint8Array(wasm.memory.buffer); array.set(buf, ptr); return [ptr, len]; @@ -56,7 +56,7 @@ export function greet(arg0) { wasm.__wbindgen_boxed_str_free(ret); return realRet; } finally { - wasm.__wbindgen_free(ptr0, len0); + wasm.__wbindgen_free(ptr0, len0, 1); } } ``` diff --git a/vendor/wasm-bindgen/src/closure.rs b/vendor/wasm-bindgen/src/closure.rs index c8d2ba225378115e66b518af221cb0e6396d3820..a498d6d2513e649ab96b2881c1a03707eb069293 100644 --- a/vendor/wasm-bindgen/src/closure.rs +++ b/vendor/wasm-bindgen/src/closure.rs @@ -4,6 +4,8 @@ //! closures" from Rust to JS. Some more details can be found on the `Closure` //! type itself. +#![allow(clippy::fn_to_numeric_cast)] + use std::fmt; use std::mem::{self, ManuallyDrop}; use std::prelude::v1::*; diff --git a/vendor/wasm-bindgen/src/convert/closures.rs b/vendor/wasm-bindgen/src/convert/closures.rs index 9137065a29227b6351bc2f78e95a7dc3f906bd8c..02527173d3774b11eb83220185adc7a36a010193 100644 --- a/vendor/wasm-bindgen/src/convert/closures.rs +++ b/vendor/wasm-bindgen/src/convert/closures.rs @@ -1,3 +1,5 @@ +#![allow(clippy::fn_to_numeric_cast)] + use core::mem; use crate::convert::slices::WasmSlice; diff --git a/vendor/wasm-bindgen/src/convert/slices.rs b/vendor/wasm-bindgen/src/convert/slices.rs index 58608b8c520faf77c05bc97a2fadf2123283a436..40ea6edc7c88bb6358c13cb77ff30213e5207afe 100644 --- a/vendor/wasm-bindgen/src/convert/slices.rs +++ b/vendor/wasm-bindgen/src/convert/slices.rs @@ -364,7 +364,7 @@ if_std! { let ptr = <*mut JsValue>::from_abi(js.ptr); let len = js.len as usize; let vec: Vec = Vec::from_raw_parts(ptr, len, len).drain(..).map(|js_value| T::unchecked_from_js(js_value)).collect(); - return vec.into_boxed_slice(); + vec.into_boxed_slice() } } diff --git a/vendor/wasm-bindgen/src/convert/traits.rs b/vendor/wasm-bindgen/src/convert/traits.rs index 30cc4813c56c40db220857aa73bab856be6ea237..fe31aab63a45879d8e4e9eb0f9345fedd3e37696 100644 --- a/vendor/wasm-bindgen/src/convert/traits.rs +++ b/vendor/wasm-bindgen/src/convert/traits.rs @@ -120,9 +120,11 @@ pub trait OptionFromWasmAbi: FromWasmAbi { /// An unsafe trait which represents types that are ABI-safe to pass via wasm /// arguments. /// +/// # Safety +/// /// This is an unsafe trait to implement as there's no guarantee the type is /// actually safe to transfer across the was boundary, it's up to you to -/// guarantee this so codegen works correctly. +/// guarantee this, so codegen works correctly. pub unsafe trait WasmAbi {} unsafe impl WasmAbi for u32 {} diff --git a/vendor/wasm-bindgen/src/lib.rs b/vendor/wasm-bindgen/src/lib.rs index e42c933c5c8411abb3d0e2490cd0330043ecdc40..fd2feae6f29dc82c6e867aaa326583e3e55e644b 100644 --- a/vendor/wasm-bindgen/src/lib.rs +++ b/vendor/wasm-bindgen/src/lib.rs @@ -95,7 +95,7 @@ pub struct JsValue { } const JSIDX_OFFSET: u32 = 128; // keep in sync with js/mod.rs -const JSIDX_UNDEFINED: u32 = JSIDX_OFFSET + 0; +const JSIDX_UNDEFINED: u32 = JSIDX_OFFSET; const JSIDX_NULL: u32 = JSIDX_OFFSET + 1; const JSIDX_TRUE: u32 = JSIDX_OFFSET + 2; const JSIDX_FALSE: u32 = JSIDX_OFFSET + 3; @@ -126,6 +126,7 @@ impl JsValue { /// /// The utf-8 string provided is copied to the JS heap and the string will /// be owned by the JS garbage collector. + #[allow(clippy::should_implement_trait)] // cannot fix without breaking change #[inline] pub fn from_str(s: &str) -> JsValue { unsafe { JsValue::_new(__wbindgen_string_new(s.as_ptr(), s.len())) } @@ -608,10 +609,10 @@ impl TryFrom<&JsValue> for f64 { #[inline] fn try_from(val: &JsValue) -> Result { let jsval = unsafe { JsValue::_new(__wbindgen_try_into_number(val.idx)) }; - return match jsval.as_f64() { + match jsval.as_f64() { Some(num) => Ok(num), None => Err(jsval), - }; + } } } @@ -1565,11 +1566,9 @@ pub mod __rt { if_std! { use std::alloc::{alloc, dealloc, realloc, Layout}; - use std::mem; #[no_mangle] - pub extern "C" fn __wbindgen_malloc(size: usize) -> *mut u8 { - let align = mem::align_of::(); + pub extern "C" fn __wbindgen_malloc(size: usize, align: usize) -> *mut u8 { if let Ok(layout) = Layout::from_size_align(size, align) { unsafe { if layout.size() > 0 { @@ -1587,8 +1586,7 @@ pub mod __rt { } #[no_mangle] - pub unsafe extern "C" fn __wbindgen_realloc(ptr: *mut u8, old_size: usize, new_size: usize) -> *mut u8 { - let align = mem::align_of::(); + pub unsafe extern "C" fn __wbindgen_realloc(ptr: *mut u8, old_size: usize, new_size: usize, align: usize) -> *mut u8 { debug_assert!(old_size > 0); debug_assert!(new_size > 0); if let Ok(layout) = Layout::from_size_align(old_size, align) { @@ -1610,13 +1608,12 @@ pub mod __rt { } #[no_mangle] - pub unsafe extern "C" fn __wbindgen_free(ptr: *mut u8, size: usize) { + pub unsafe extern "C" fn __wbindgen_free(ptr: *mut u8, size: usize, align: usize) { // This happens for zero-length slices, and in that case `ptr` is // likely bogus so don't actually send this to the system allocator if size == 0 { return } - let align = mem::align_of::(); let layout = Layout::from_size_align_unchecked(size, align); dealloc(ptr, layout); } @@ -1677,7 +1674,7 @@ pub mod __rt { }; GLOBAL_EXNDATA[0] = 0; GLOBAL_EXNDATA[1] = 0; - return ret; + ret } } diff --git a/vendor/wasm-bindgen/tests/non_wasm.rs b/vendor/wasm-bindgen/tests/non_wasm.rs index 00c2a3961be49a8f77486ad8b0f812c5d16fccd9..dd770732302470b8273fd7dfe064f65ef10290fc 100644 --- a/vendor/wasm-bindgen/tests/non_wasm.rs +++ b/vendor/wasm-bindgen/tests/non_wasm.rs @@ -14,7 +14,7 @@ impl A { } pub fn foo(&self) { - drop(self.x); + assert_eq!(self.x, 3); } } diff --git a/vendor/wasm-bindgen/tests/wasm/api.rs b/vendor/wasm-bindgen/tests/wasm/api.rs index 26da4fc9ab033eaced8ef82627b3e3419412830f..b3c578706d31c8cf688120643360e4f4d79d29c6 100644 --- a/vendor/wasm-bindgen/tests/wasm/api.rs +++ b/vendor/wasm-bindgen/tests/wasm/api.rs @@ -82,14 +82,14 @@ pub fn api_mk_symbol() -> JsValue { let a = JsValue::symbol(None); assert!(a.is_symbol()); assert_eq!(format!("{:?}", a), "JsValue(Symbol)"); - return a; + a } #[wasm_bindgen] pub fn api_mk_symbol2(s: &str) -> JsValue { let a = JsValue::symbol(Some(s)); assert!(a.is_symbol()); - return a; + a } #[wasm_bindgen] @@ -121,6 +121,7 @@ pub fn eq_test(a: &JsValue, b: &JsValue) -> bool { } #[wasm_bindgen] +#[allow(clippy::eq_op)] pub fn eq_test1(a: &JsValue) -> bool { a == a } @@ -132,8 +133,8 @@ pub fn api_completely_variadic(args: &JsValue) -> JsValue { #[wasm_bindgen(variadic)] pub fn api_variadic_with_prefixed_params( - first: &JsValue, - second: &JsValue, + _first: &JsValue, + _second: &JsValue, args: &JsValue, ) -> JsValue { args.into() diff --git a/vendor/wasm-bindgen/tests/wasm/classes.rs b/vendor/wasm-bindgen/tests/wasm/classes.rs index 3588bb74cb261e83a4437829cffe4e9682318092..9321ff92d7f61eb6e0d430f7f99867c4cb869968 100644 --- a/vendor/wasm-bindgen/tests/wasm/classes.rs +++ b/vendor/wasm-bindgen/tests/wasm/classes.rs @@ -599,12 +599,12 @@ impl OverriddenInspectable { } #[wasm_bindgen(js_name = toJSON)] - pub fn to_json(&self) -> String { + pub fn js_to_json(&self) -> String { String::from("JSON was overwritten") } #[wasm_bindgen(js_name = toString)] - pub fn to_string(&self) -> String { + pub fn js_to_string(&self) -> String { String::from("string was overwritten") } } diff --git a/vendor/wasm-bindgen/tests/wasm/closures.rs b/vendor/wasm-bindgen/tests/wasm/closures.rs index e94ed2427004c36db98872fbe515869fd2d60aea..1061dab5ab9d49d3bfd8686bd3e5d62e162e11ec 100644 --- a/vendor/wasm-bindgen/tests/wasm/closures.rs +++ b/vendor/wasm-bindgen/tests/wasm/closures.rs @@ -510,7 +510,7 @@ fn test_closure_returner() { Reflect::set( &o, &JsValue::from("someKey"), - &some_fn.as_ref().unchecked_ref(), + some_fn.as_ref().unchecked_ref(), ) .unwrap(); Reflect::set( diff --git a/vendor/wasm-bindgen/tests/wasm/futures.rs b/vendor/wasm-bindgen/tests/wasm/futures.rs index 7dfddf2092ea397abcd2473eddbf108942b644b1..3679a0d4836f99dd048945c71942f918ee8dbe91 100644 --- a/vendor/wasm-bindgen/tests/wasm/futures.rs +++ b/vendor/wasm-bindgen/tests/wasm/futures.rs @@ -93,9 +93,9 @@ pub struct AsyncCustomError { pub val: JsValue, } -impl Into for AsyncCustomError { - fn into(self) -> JsValue { - self.val +impl From for JsValue { + fn from(e: AsyncCustomError) -> Self { + e.val } } diff --git a/vendor/wasm-bindgen/tests/wasm/import_class.rs b/vendor/wasm-bindgen/tests/wasm/import_class.rs index a8e538931d95400f4280f986bcfce98c27c21c83..cd9b4cfb738bd09eb5f6d79f8e03f2e33a740b36 100644 --- a/vendor/wasm-bindgen/tests/wasm/import_class.rs +++ b/vendor/wasm-bindgen/tests/wasm/import_class.rs @@ -1,6 +1,7 @@ //! dox #![deny(missing_docs)] // test that documenting public bindings is enough +#![allow(clippy::redundant_clone)] // test specifically with cloned objects use wasm_bindgen::prelude::*; use wasm_bindgen_test::*; @@ -173,7 +174,6 @@ fn rename_type() { } #[wasm_bindgen_test] -#[cfg(ignored)] // TODO: fix this before landing fn switch_methods() { assert!(!switch_methods_called()); SwitchMethods::a(); diff --git a/vendor/wasm-bindgen/tests/wasm/imports.rs b/vendor/wasm-bindgen/tests/wasm/imports.rs index 27e4a67dca3a5f23d4142a66735c5cc5bccdb06e..a9fbb33b7b1cd650369ddd94e589932e4f4c1bf8 100644 --- a/vendor/wasm-bindgen/tests/wasm/imports.rs +++ b/vendor/wasm-bindgen/tests/wasm/imports.rs @@ -33,6 +33,7 @@ extern "C" { #[wasm_bindgen(js_name = pub)] fn js_function_named_rust_keyword() -> u32; + #[allow(non_camel_case_types)] type bar; #[wasm_bindgen(js_namespace = bar, js_name = foo)] static FOO: JsValue; diff --git a/vendor/wasm-bindgen/tests/wasm/js_keywords.rs b/vendor/wasm-bindgen/tests/wasm/js_keywords.rs index 57feed7a7c6c52730932dbbb9cddfba1e4a73f6e..7a4eb4a1b7a5be9ec1c6f145bd16bc780ae4b0d7 100644 --- a/vendor/wasm-bindgen/tests/wasm/js_keywords.rs +++ b/vendor/wasm-bindgen/tests/wasm/js_keywords.rs @@ -25,7 +25,7 @@ pub fn arg_is_keyword(class: u8) -> u8 { } #[wasm_bindgen] -struct Class { +pub struct Class { name: String, } #[wasm_bindgen] @@ -50,6 +50,6 @@ impl Class { fn compile() { js_keywords_compile(); assert_eq!(test_keyword_1_as_fn_name(1), 1); - assert_eq!(test_keyword_2_as_fn_name(1, 2), false); + assert!(!test_keyword_2_as_fn_name(1, 2)); assert_eq!(test_keyword_as_fn_arg(1), 1); } diff --git a/vendor/wasm-bindgen/tests/wasm/js_objects.rs b/vendor/wasm-bindgen/tests/wasm/js_objects.rs index 445d5329aaafb228da79c9d980603a5d0177416b..af97ad6ee0908f7af8b9e375d40e537cb00887d3 100644 --- a/vendor/wasm-bindgen/tests/wasm/js_objects.rs +++ b/vendor/wasm-bindgen/tests/wasm/js_objects.rs @@ -145,6 +145,7 @@ fn another_vector_string_return() { #[cfg(feature = "serde-serialize")] #[wasm_bindgen_test] +#[allow(deprecated)] fn serde() { #[derive(Deserialize, Serialize)] pub struct SerdeFoo { @@ -172,12 +173,12 @@ fn serde() { .unwrap(), ); - let foo = ret.into_serde::().unwrap(); - assert_eq!(foo.a, 2); - assert_eq!(foo.b, "bar"); - assert!(foo.c.is_some()); - assert_eq!(foo.c.as_ref().unwrap().a, 3); - assert_eq!(foo.d.a, 4); + let result = ret.into_serde::().unwrap(); + assert_eq!(result.a, 2); + assert_eq!(result.b, "bar"); + assert!(result.c.is_some()); + assert_eq!(result.c.as_ref().unwrap().a, 3); + assert_eq!(result.d.a, 4); assert_eq!(JsValue::from("bar").into_serde::().unwrap(), "bar"); assert_eq!(JsValue::undefined().into_serde::().ok(), None); diff --git a/vendor/wasm-bindgen/tests/wasm/main.rs b/vendor/wasm-bindgen/tests/wasm/main.rs index 987962c88aac4a8c7099e23ed72ffe0baba93069..508a9ea1f78cb53b7e93d79ec0828909b387707b 100644 --- a/vendor/wasm-bindgen/tests/wasm/main.rs +++ b/vendor/wasm-bindgen/tests/wasm/main.rs @@ -1,4 +1,6 @@ #![cfg(target_arch = "wasm32")] +#![allow(renamed_and_removed_lints)] // clippy::drop_ref will be renamed to drop_ref +#![allow(clippy::drop_ref, clippy::drop_non_drop)] extern crate js_sys; extern crate wasm_bindgen; diff --git a/vendor/wasm-bindgen/tests/wasm/no_shims.rs b/vendor/wasm-bindgen/tests/wasm/no_shims.rs index 2f9455ae2e4339654c075c94eb07d9cf967a17c5..f56701b69da17bb5dc793ff1cae9e680042fefbb 100644 --- a/vendor/wasm-bindgen/tests/wasm/no_shims.rs +++ b/vendor/wasm-bindgen/tests/wasm/no_shims.rs @@ -22,7 +22,7 @@ use wasm_bindgen_test::*; module.exports.incoming_u32 = function () { return 4294967295; }; module.exports.incoming_i32 = function () { return 0; }; module.exports.incoming_f32 = function () { return 1.5; }; - module.exports.incoming_f64 = function () { return 13.37; }; + module.exports.incoming_f64 = function () { return Math.PI; }; module.exports.outgoing_u8 = function (k) { assert_eq(k, 255); }; module.exports.outgoing_i8 = function (i) { assert_eq(i, -127); }; @@ -30,12 +30,12 @@ use wasm_bindgen_test::*; module.exports.outgoing_i16 = function (j) { assert_eq(j, 32767); }; module.exports.outgoing_i32 = function (x) { assert_eq(x, 0); }; module.exports.outgoing_f32 = function (y) { assert_eq(y, 1.5); }; - module.exports.outgoing_f64 = function (z) { assert_eq(z, 13.37); }; + module.exports.outgoing_f64 = function (pi) { assert_eq(pi, Math.PI); }; - module.exports.many = function (x, y, z) { + module.exports.many = function (x, y, pi) { assert_eq(x, 0); assert_eq(y, 1.5); - assert_eq(z, 13.37); + assert_eq(pi, Math.PI); return 42; }; @@ -45,8 +45,8 @@ use wasm_bindgen_test::*; }; module.exports.MyNamespace = {}; - module.exports.MyNamespace.incoming_namespaced = function () { return 3.14; }; - module.exports.MyNamespace.outgoing_namespaced = function (pi) { assert_eq(3.14, pi); }; + module.exports.MyNamespace.incoming_namespaced = function () { return 13.37; }; + module.exports.MyNamespace.outgoing_namespaced = function (w) { assert_eq(13.37, w); }; ")] extern "C" { #[wasm_bindgen(assert_no_shim)] @@ -132,16 +132,16 @@ fn no_shims() { assert_eq!(y, 1.5); outgoing_f32(y); - let z = incoming_f64(); - assert_eq!(z, 13.37); - outgoing_f64(z); + let pi = incoming_f64(); + assert_eq!(pi, std::f64::consts::PI); + outgoing_f64(pi); - let w = many(x, y, z); - assert_eq!(w, 42); + let z = many(x, y, pi); + assert_eq!(z, 42); - let pi = incoming_namespaced(); - assert_eq!(pi, 3.14); - outgoing_namespaced(pi); + let w = incoming_namespaced(); + assert_eq!(w, 13.37); + outgoing_namespaced(w); let b = incoming_bool(); assert!(b); diff --git a/vendor/wasm-bindgen/tests/wasm/owned.rs b/vendor/wasm-bindgen/tests/wasm/owned.rs index 7d51673a557084456150ea653b8198ab3f912792..97e7d6fda3ca5599e5e09233588892fcfe6c2062 100644 --- a/vendor/wasm-bindgen/tests/wasm/owned.rs +++ b/vendor/wasm-bindgen/tests/wasm/owned.rs @@ -13,6 +13,7 @@ impl OwnedValue { Self { n } } + #[allow(clippy::should_implement_trait)] // traits unsupported by wasm_bindgen pub fn add(self, other: OwnedValue) -> Self { Self { n: self.n + other.n, diff --git a/vendor/wasm-bindgen/tests/wasm/result.rs b/vendor/wasm-bindgen/tests/wasm/result.rs index c2c043ab877c6ec06b09ee8f62600004f4474307..3f30acc02f2cd69c1d6f21b8ce73010767785617 100644 --- a/vendor/wasm-bindgen/tests/wasm/result.rs +++ b/vendor/wasm-bindgen/tests/wasm/result.rs @@ -20,9 +20,9 @@ extern "C" { fn error_new(message: &str) -> JsValue; } -impl Into for MyError { - fn into(self) -> JsValue { - error_new(&format!("{}", self)) +impl From for JsValue { + fn from(e: MyError) -> Self { + error_new(&format!("{}", e)) } } @@ -87,7 +87,7 @@ impl Struct { #[wasm_bindgen] pub fn new_err() -> Result { - Err(MyError::Variant.into()) + Err(MyError::Variant) } #[wasm_bindgen] diff --git a/vendor/wasm-bindgen/tests/wasm/result_jserror.rs b/vendor/wasm-bindgen/tests/wasm/result_jserror.rs index f714ac2f133948bdb49652dbf00a3c3a1c20a076..e0ecbac173ccdde20fbc6ceba9b0854ff33ee379 100644 --- a/vendor/wasm-bindgen/tests/wasm/result_jserror.rs +++ b/vendor/wasm-bindgen/tests/wasm/result_jserror.rs @@ -45,7 +45,7 @@ call_test!(test_ok, call_ok); #[wasm_bindgen] pub fn make_an_error() -> JsError { - JsError::new("un-thrown error").into() + JsError::new("un-thrown error") } call_test!(test_make_an_error, call_make_an_error); diff --git a/vendor/wasm-bindgen/tests/wasm/simple.rs b/vendor/wasm-bindgen/tests/wasm/simple.rs index 5f22b6ea93e00063125159a408a8ae25f7a5e1e2..db653847a3af2aa233601ae09b49dddb005b89fd 100644 --- a/vendor/wasm-bindgen/tests/wasm/simple.rs +++ b/vendor/wasm-bindgen/tests/wasm/simple.rs @@ -57,11 +57,9 @@ pub fn simple_return_and_take_bool(a: bool, b: bool) -> bool { } #[wasm_bindgen] -pub fn simple_raw_pointers_work(a: *mut u32, b: *const u8) -> *const u32 { - unsafe { - (*a) = (*b) as u32; - return a; - } +pub unsafe fn simple_raw_pointers_work(a: *mut u32, b: *const u8) -> *const u32 { + (*a) = (*b) as u32; + a } #[wasm_bindgen_test] @@ -218,6 +216,7 @@ pub fn do_string_roundtrip(s: String) -> String { } #[wasm_bindgen_test] +#[allow(clippy::redundant_clone)] // clone to increase heap live count fn externref_heap_live_count() { let x = wasm_bindgen::externref_heap_live_count(); let y = JsValue::null().clone(); diff --git a/vendor/wasm-bindgen/tests/wasm/slice.rs b/vendor/wasm-bindgen/tests/wasm/slice.rs index 2f2457bc114f763a3038fd5f3ee6cf89ef8c186a..6e659ce6f546ebb477c3d2babb85fb97fcfd6229 100644 --- a/vendor/wasm-bindgen/tests/wasm/slice.rs +++ b/vendor/wasm-bindgen/tests/wasm/slice.rs @@ -211,6 +211,7 @@ pub struct ReturnVecApplication { #[wasm_bindgen] impl ReturnVecApplication { + #[allow(clippy::vec_init_then_push)] pub fn new() -> ReturnVecApplication { let mut thing = vec![]; thing.push(0); diff --git a/vendor/wasm-bindgen/tests/wasm/truthy_falsy.rs b/vendor/wasm-bindgen/tests/wasm/truthy_falsy.rs index d04abb05319a72e1c4cee11202ec1cada5dabe1f..83657ca0adbc89edfb76b338e9874f0a24478325 100644 --- a/vendor/wasm-bindgen/tests/wasm/truthy_falsy.rs +++ b/vendor/wasm-bindgen/tests/wasm/truthy_falsy.rs @@ -3,26 +3,26 @@ use wasm_bindgen_test::*; #[wasm_bindgen_test] fn test_is_truthy() { - assert_eq!(JsValue::from(0).is_truthy(), false); - assert_eq!(JsValue::from("".to_string()).is_truthy(), false); - assert_eq!(JsValue::from(false).is_truthy(), false); - assert_eq!(JsValue::NULL.is_truthy(), false); - assert_eq!(JsValue::UNDEFINED.is_truthy(), false); + assert!(!JsValue::from(0).is_truthy()); + assert!(!JsValue::from("".to_string()).is_truthy()); + assert!(!JsValue::from(false).is_truthy()); + assert!(!JsValue::NULL.is_truthy()); + assert!(!JsValue::UNDEFINED.is_truthy()); - assert_eq!(JsValue::from(10).is_truthy(), true); - assert_eq!(JsValue::from("null".to_string()).is_truthy(), true); - assert_eq!(JsValue::from(true).is_truthy(), true); + assert!(JsValue::from(10).is_truthy()); + assert!(JsValue::from("null".to_string()).is_truthy()); + assert!(JsValue::from(true).is_truthy()); } #[wasm_bindgen_test] fn test_is_falsy() { - assert_eq!(JsValue::from(0).is_falsy(), true); - assert_eq!(JsValue::from("".to_string()).is_falsy(), true); - assert_eq!(JsValue::from(false).is_falsy(), true); - assert_eq!(JsValue::NULL.is_falsy(), true); - assert_eq!(JsValue::UNDEFINED.is_falsy(), true); + assert!(JsValue::from(0).is_falsy()); + assert!(JsValue::from("".to_string()).is_falsy()); + assert!(JsValue::from(false).is_falsy()); + assert!(JsValue::NULL.is_falsy()); + assert!(JsValue::UNDEFINED.is_falsy()); - assert_eq!(JsValue::from(10).is_falsy(), false); - assert_eq!(JsValue::from("null".to_string()).is_falsy(), false); - assert_eq!(JsValue::from(true).is_falsy(), false); + assert!(!JsValue::from(10).is_falsy()); + assert!(!JsValue::from("null".to_string()).is_falsy()); + assert!(!JsValue::from(true).is_falsy()); } diff --git a/vendor/wasm-bindgen/tests/worker/main.rs b/vendor/wasm-bindgen/tests/worker/main.rs index 70ae686b92ec48e3a7f680f7ae10e661f2474ade..16f358c0881ea7b4c77255341efc4980a88654d9 100644 --- a/vendor/wasm-bindgen/tests/worker/main.rs +++ b/vendor/wasm-bindgen/tests/worker/main.rs @@ -5,7 +5,7 @@ extern crate wasm_bindgen; extern crate wasm_bindgen_test; use wasm_bindgen::prelude::*; -use wasm_bindgen_test::{wasm_bindgen_test, wasm_bindgen_test_configure}; +use wasm_bindgen_test::wasm_bindgen_test_configure; wasm_bindgen_test_configure!(run_in_worker);