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

Fix error handling in web feature#1

Open
gboutry wants to merge 1 commit intoast-grep:mainfrom
gboutry:fix-error-handling
Open

Fix error handling in web feature#1
gboutry wants to merge 1 commit intoast-grep:mainfrom
gboutry:fix-error-handling

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