Skip to content

Commit c8451d6

Browse files
committed
Rename some files
* Use "legacy" instead of "stable" since `futures 0.1` is quicly becoming "legacy" * Rename "atomics" to "legacy_atomics" to leave room for the libstd-based futures atomics version. * Rename "polyfill" to "wait_async_polyfill" to specify what it's polyfilling.
1 parent d590a9e commit c8451d6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed
File renamed without changes.

crates/futures/src/atomics.rs renamed to crates/futures/src/legacy_atomics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ fn wait_async(ptr: &AtomicI32, val: i32) -> js_sys::Promise {
160160
// If `Atomics.waitAsync` isn't defined (as it isn't defined anywhere today)
161161
// then we use our fallback, otherwise we use the native function.
162162
if Atomics::get_wait_async().is_undefined() {
163-
crate::polyfill::wait_async(ptr, val)
163+
crate::wait_async_polyfill::wait_async(ptr, val)
164164
} else {
165165
let mem = wasm_bindgen::memory().unchecked_into::<js_sys::WebAssembly::Memory>();
166166
Atomics::wait_async(&mem.buffer(), ptr as *const AtomicI32 as i32 / 4, val)

crates/futures/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ pub use legacy_js2rust::*;
112112
cfg_if! {
113113
if #[cfg(target_feature = "atomics")] {
114114
/// Contains a thread-safe version of this crate, with Futures 0.1
115-
mod atomics;
115+
mod legacy_atomics;
116116

117117
/// Polyfill for `Atomics.waitAsync` function
118-
mod polyfill;
118+
mod wait_async_polyfill;
119119

120-
pub use atomics::*;
120+
pub use legacy_atomics::*;
121121
} else {
122-
mod stable;
123-
pub use stable::*;
122+
mod legacy;
123+
pub use legacy::*;
124124
}
125125
}
126126

0 commit comments

Comments
 (0)