| { | ||
| "git": { | ||
| "sha1": "ddd322514d87a4b21342b7ab9a9d70796fc60576" | ||
| "sha1": "861696ae5ad7679c6b3eed7a448e34d65ced12e4" | ||
| }, | ||
| "path_in_vcs": "crates/js-sys" | ||
| } |
+13
-14
@@ -79,3 +79,3 @@ # This file is automatically @generated by Cargo. | ||
| name = "js-sys" | ||
| version = "0.3.99" | ||
| version = "0.3.100" | ||
| dependencies = [ | ||
@@ -88,3 +88,2 @@ "cfg-if", | ||
| "half", | ||
| "once_cell", | ||
| "wasm-bindgen", | ||
@@ -154,5 +153,5 @@ ] | ||
| name = "wasm-bindgen" | ||
| version = "0.2.122" | ||
| version = "0.2.123" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "3ed04576f974d2b2fba0f38c51dbc5518011e38c36bf1143164be765528fd409" | ||
| checksum = "a254a4b10c19a76f09a27640e7ffbf9bc30bf67e16a3bf28aaefa4920fe81563" | ||
| dependencies = [ | ||
@@ -168,5 +167,5 @@ "cfg-if", | ||
| name = "wasm-bindgen-macro" | ||
| version = "0.2.122" | ||
| version = "0.2.123" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "916151b09da36bd82f6615cbf3a419e2f0ba23a03c6160e8e92eb6bd4aa1dec6" | ||
| checksum = "24a40fc75b0ec6f3746ceb10d36f53a93dcd68a93b11b6445983945d79eba0dc" | ||
| dependencies = [ | ||
@@ -179,5 +178,5 @@ "quote", | ||
| name = "wasm-bindgen-macro-support" | ||
| version = "0.2.122" | ||
| version = "0.2.123" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "299047362ccbfce148b67ab7e73349f77748e00c8296f9542adfad2ad82c5c5e" | ||
| checksum = "908f34bd9b9ce3d4caf07b72dfab63d61504d156856c6bd3cd87fa350cf3985b" | ||
| dependencies = [ | ||
@@ -193,5 +192,5 @@ "bumpalo", | ||
| name = "wasm-bindgen-shared" | ||
| version = "0.2.122" | ||
| version = "0.2.123" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "9a929b2c61f11ba3e9bc35b50c1f25cb38e0e892c0c231ae2b8cf78d5dad4437" | ||
| checksum = "7acbf7616c27b194bbb550bf77ed0c2c3e5b7fd1260a93082b95fb7f47959b92" | ||
| dependencies = [ | ||
@@ -203,5 +202,5 @@ "unicode-ident", | ||
| name = "zerocopy" | ||
| version = "0.8.48" | ||
| version = "0.8.50" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" | ||
| checksum = "3b065d4f0e55f82fae73202e189638116a87c55ab6b8e6c2721e13dd9d854ad1" | ||
| dependencies = [ | ||
@@ -213,5 +212,5 @@ "zerocopy-derive", | ||
| name = "zerocopy-derive" | ||
| version = "0.8.48" | ||
| version = "0.8.50" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" | ||
| checksum = "0b631b19d36a892ab55420c92dbc83ccd79274f25be714855d3074aa71cab639" | ||
| dependencies = [ | ||
@@ -218,0 +217,0 @@ "proc-macro2", |
+2
-6
@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "js-sys" | ||
| version = "0.3.99" | ||
| version = "0.3.100" | ||
| authors = ["The wasm-bindgen Developers"] | ||
@@ -75,8 +75,4 @@ build = false | ||
| [dependencies.once_cell] | ||
| version = "1.12" | ||
| default-features = false | ||
| [dependencies.wasm-bindgen] | ||
| version = "=0.2.122" | ||
| version = "=0.2.123" | ||
| default-features = false | ||
@@ -83,0 +79,0 @@ |
+20
-4
@@ -43,6 +43,14 @@ //! Converting between JavaScript `Promise`s to Rust `Future`s. | ||
| use core::task::{Context, Poll, Waker}; | ||
| #[cfg(all(target_family = "wasm", feature = "std", panic = "unwind"))] | ||
| #[cfg(all( | ||
| all(target_family = "wasm", not(target_os = "wasi")), | ||
| feature = "std", | ||
| panic = "unwind" | ||
| ))] | ||
| use futures_util::FutureExt; | ||
| use wasm_bindgen::__rt::marker::ErasableGeneric; | ||
| #[cfg(all(target_family = "wasm", feature = "std", panic = "unwind"))] | ||
| #[cfg(all( | ||
| all(target_family = "wasm", not(target_os = "wasi")), | ||
| feature = "std", | ||
| panic = "unwind" | ||
| ))] | ||
| use wasm_bindgen::__rt::panic_to_panic_error; | ||
@@ -250,3 +258,7 @@ use wasm_bindgen::convert::{FromWasmAbi, Upcast}; | ||
| /// still usable (likely erroneously) after Rust panics. | ||
| #[cfg(not(all(target_family = "wasm", feature = "std", panic = "unwind")))] | ||
| #[cfg(not(all( | ||
| all(target_family = "wasm", not(target_os = "wasi")), | ||
| feature = "std", | ||
| panic = "unwind" | ||
| )))] | ||
| pub fn future_to_promise<F>(future: F) -> Promise | ||
@@ -289,3 +301,7 @@ where | ||
| /// with a PanicError. | ||
| #[cfg(all(target_family = "wasm", feature = "std", panic = "unwind"))] | ||
| #[cfg(all( | ||
| all(target_family = "wasm", not(target_os = "wasi")), | ||
| feature = "std", | ||
| panic = "unwind" | ||
| ))] | ||
| pub fn future_to_promise<F>(future: F) -> Promise | ||
@@ -292,0 +308,0 @@ where |
+3
-11
@@ -116,17 +116,9 @@ use crate::Promise; | ||
| pub(crate) fn with<R>(f: impl FnOnce(&Self) -> R) -> R { | ||
| use once_cell::unsync::Lazy; | ||
| use wasm_bindgen::__rt::LazyCell; | ||
| struct Wrapper<T>(Lazy<T>); | ||
| #[cfg(not(target_feature = "atomics"))] | ||
| unsafe impl<T> Sync for Wrapper<T> {} | ||
| #[cfg(not(target_feature = "atomics"))] | ||
| unsafe impl<T> Send for Wrapper<T> {} | ||
| #[cfg_attr(target_feature = "atomics", thread_local)] | ||
| static QUEUE: Wrapper<Queue> = Wrapper(Lazy::new(Queue::new)); | ||
| static QUEUE: LazyCell<Queue> = LazyCell::new(Queue::new); | ||
| f(&QUEUE.0) | ||
| f(&QUEUE) | ||
| } | ||
| } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display