Skip to content

Commit 1f39c26

Browse files
committed
Rename feature for better conveying the intention
1 parent ebd2748 commit 1f39c26

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ serde_json = "1"
3939
criterion = "0.5"
4040
serde_json = "1"
4141

42-
[target.'cfg(all(target_arch = "wasm32", not(feature = "non-js")))'.dev-dependencies]
42+
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
4343
criterion = { version = "0.5", default-features = false }
4444
wasm-bindgen-test = "0.3"
4545

4646
[features]
4747
default = ["builder"]
4848
ser = ["serde"]
4949
builder = ["derive_builder"]
50-
non-js = []
50+
custom_wasm_env = []
5151

5252
[profile.test]
5353
opt-level = 2

src/feedback.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ fn get_dictionary_match_feedback(
292292
mod tests {
293293
use super::*;
294294

295-
#[cfg(all(target_arch = "wasm32", not(feature = "non-js")))]
295+
#[cfg(all(target_arch = "wasm32", not(feature = "custom_wasm_env")))]
296296
use wasm_bindgen_test::wasm_bindgen_test;
297297

298298
#[cfg_attr(not(target_arch = "wasm32"), test)]

src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extern crate quickcheck;
1717

1818
pub use scoring::Score;
1919
use time_estimates::CrackTimes;
20-
#[cfg(all(target_arch = "wasm32", not(feature = "non-js")))]
20+
#[cfg(all(target_arch = "wasm32", not(feature = "custom_wasm_env")))]
2121
use wasm_bindgen::prelude::wasm_bindgen;
2222

2323
pub use crate::matching::Match;
@@ -41,7 +41,7 @@ where
4141
(result, calc_time)
4242
}
4343

44-
#[cfg(all(target_arch = "wasm32", not(feature = "non-js")))]
44+
#[cfg(all(target_arch = "wasm32", not(feature = "custom_wasm_env")))]
4545
#[allow(non_upper_case_globals)]
4646
fn time_scoped<F, R>(f: F) -> (R, Duration)
4747
where
@@ -60,7 +60,7 @@ where
6060
(result, calc_time)
6161
}
6262

63-
#[cfg(all(target_arch = "wasm32", feature = "non-js"))]
63+
#[cfg(all(target_arch = "wasm32", feature = "custom_wasm_env"))]
6464
fn time_scoped<F, R>(f: F) -> (R, Duration)
6565
where
6666
F: FnOnce() -> R,

src/scoring.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ lazy_static! {
7777
pub(crate) static ref REFERENCE_YEAR: i32 = time::OffsetDateTime::now_utc().year();
7878
}
7979

80-
#[cfg(all(target_arch = "wasm32", not(feature = "non-js")))]
80+
#[cfg(all(target_arch = "wasm32", not(feature = "custom_wasm_env")))]
8181
lazy_static! {
8282
pub(crate) static ref REFERENCE_YEAR: i32 = web_sys::js_sys::Date::new_0()
8383
.get_full_year()
8484
.try_into()
8585
.unwrap();
8686
}
8787

88-
#[cfg(all(target_arch = "wasm32", feature = "non-js"))]
88+
#[cfg(all(target_arch = "wasm32", feature = "custom_wasm_env"))]
8989
lazy_static! {
9090
pub(crate) static ref REFERENCE_YEAR: i32 = {
9191
#[link(wasm_import_module = "zxcvbn")]

0 commit comments

Comments
 (0)