Fix .wasm module extension check (#17)

This commit is contained in:
folex 2020-08-14 13:54:52 +03:00 committed by GitHub
parent 77cd79e124
commit a670ec76cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@ impl<'a> ModulesLoadStrategy<'a> {
match self {
ModulesLoadStrategy::All => true,
ModulesLoadStrategy::Named(set) => set.contains(module.to_string_lossy().as_ref()),
ModulesLoadStrategy::WasmOnly => module.extension().map_or(false, |e| e == ".wasm"),
ModulesLoadStrategy::WasmOnly => module.extension().map_or(false, |e| e == "wasm"),
}
}