Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Fix error handling in web feature #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gboutry
Copy link

@gboutry gboutry commented Dec 25, 2022

Compilation fails when compiling the web features:

cargo build --target wasm32-unknown-unknown --no-default-features --features web
   Compiling web-tree-sitter-sg v1.3.0 (/home/gboutry/Documents/projects/web-tree-sitter-sg)
error[E0277]: the trait bound `wasm_bindgen::JsValue: std::error::Error` is not satisfied
  --> src/lib.rs:85:11
   |
85 |         })?;
   |           ^ the trait `std::error::Error` is not implemented for `wasm_bindgen::JsValue`
   |
   = help: the following other types implement trait `FromResidual<R>`:
             <Result<T, F> as FromResidual<Result<Infallible, E>>>
             <Result<T, F> as FromResidual<Yeet<E>>>
   = note: required for `wasm_bindgen::JsError` to implement `From<wasm_bindgen::JsValue>`
   = note: required for `Result<(), wasm_bindgen::JsError>` to implement `FromResidual<Result<Infallible, wasm_bindgen::JsValue>>`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `web-tree-sitter-sg` due to previous error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant