File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -127,10 +127,10 @@ fn compile_zstd() {
127
127
config. file ( "zstd/lib/decompress/huf_decompress_amd64.S" ) ;
128
128
}
129
129
130
- let is_wasm_unknown_unknown =
131
- env :: var ( "TARGET" ) . ok ( ) == Some ( "wasm32-unknown-unknown" . into ( ) ) ;
130
+ let is_wasm = env :: var ( "TARGET" )
131
+ . map_or ( false , |target| target . starts_with ( "wasm32-" ) ) ;
132
132
133
- if is_wasm_unknown_unknown {
133
+ if is_wasm {
134
134
cargo_print ( "cargo:rerun-if-changed=wasm-shim/stdlib.h" ) ;
135
135
cargo_print ( "cargo:rerun-if-changed=wasm-shim/string.h" ) ;
136
136
@@ -188,7 +188,7 @@ fn compile_zstd() {
188
188
* 7+: events at every position (*very* verbose)
189
189
*/
190
190
#[ cfg( feature = "debug" ) ]
191
- if !is_wasm_unknown_unknown {
191
+ if !is_wasm {
192
192
config. define ( "DEBUGLEVEL" , Some ( "5" ) ) ;
193
193
}
194
194
You can’t perform that action at this time.
0 commit comments