Return an informative error on failing to construct a WasmStore

This commit is contained in:
Max Brunsfeld 2023-11-27 17:46:37 -08:00
parent 6fd7a1e44e
commit 13dd76e444
8 changed files with 211 additions and 97 deletions

View file

@ -868,7 +868,7 @@ impl Loader {
#[cfg(feature = "wasm")]
pub fn use_wasm(&mut self, engine: tree_sitter::wasmtime::Engine) {
*self.wasm_store.lock().unwrap() = Some(tree_sitter::WasmStore::new(engine))
*self.wasm_store.lock().unwrap() = Some(tree_sitter::WasmStore::new(engine).unwrap())
}
pub fn get_scanner_path(&self, src_path: &Path) -> Option<PathBuf> {