From 66bb3efd192886c97b4189c85cc8e338c2975f94 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Tue, 14 Jan 2025 15:04:06 -0800 Subject: [PATCH] fixup! style: fix all unexpected cfgs --- Cargo.lock | 26 +++++++++++++------------- dfir_rs/tests/surface_examples.rs | 6 +----- multiplatform_test/src/lib.rs | 5 ++++- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fbc86d1789e..810ee908697 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1893,10 +1893,11 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -4277,12 +4278,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] @@ -4321,14 +4323,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-test" -version = "0.3.43" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68497a05fb21143a08a7d24fc81763384a3072ee43c44e86aad1744d6adef9d9" +checksum = "66c8d5e33ca3b6d9fa3b4676d774c5778031d27a578c2b007f905acf816152c3" dependencies = [ - "console_error_panic_hook", "js-sys", "minicov", - "scoped-tls", "wasm-bindgen", "wasm-bindgen-futures", "wasm-bindgen-test-macro", @@ -4336,9 +4336,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.43" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8220be1fa9e4c889b30fd207d4906657e7e90b12e0e6b0c8b8d8709f5de021" +checksum = "17d5042cc5fa009658f9a7333ef24291b1291a25b6382dd68862a7f3b969f69b" dependencies = [ "proc-macro2", "quote", @@ -4347,9 +4347,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -4426,7 +4426,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/dfir_rs/tests/surface_examples.rs b/dfir_rs/tests/surface_examples.rs index 36acb582b6c..15d7ac777e9 100644 --- a/dfir_rs/tests/surface_examples.rs +++ b/dfir_rs/tests/surface_examples.rs @@ -11,11 +11,7 @@ fn test_all() { let examples_files = read_dir("examples/") .unwrap() .flat_map(Result::ok) - .filter(|entry| { - entry - .file_type() - .map_or(false, |file_type| file_type.is_file()) - }) + .filter(|entry| entry.file_type().is_ok_and(|file_type| file_type.is_file())) .map(|entry| entry.file_name()) .map(|filename| filename.into_string().unwrap()) .filter(|filename| filename.starts_with("example_") && filename.ends_with(".rs")) diff --git a/multiplatform_test/src/lib.rs b/multiplatform_test/src/lib.rs index a1826fc960a..91421ef8475 100644 --- a/multiplatform_test/src/lib.rs +++ b/multiplatform_test/src/lib.rs @@ -52,7 +52,10 @@ impl Platform { Platform::AsyncStd => quote! { #[async_std::test] }, Platform::Dfir => quote! { #[dfir_rs::test] }, Platform::Wasm => { - quote! { #[wasm_bindgen_test::wasm_bindgen_test] } + quote! { + #[allow(unexpected_cfgs, reason = "cfg(wasm_bindgen_unstable_test_coverage)")] + #[wasm_bindgen_test::wasm_bindgen_test] + } } Platform::EnvLogging | Platform::EnvTracing => Default::default(), }