Skip to content

Instantly share code, notes, and snippets.

@jasonwilliams
Created November 2, 2018 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonwilliams/991cc306911c0d88875abe71623b2739 to your computer and use it in GitHub Desktop.
Save jasonwilliams/991cc306911c0d88875abe71623b2739 to your computer and use it in GitHub Desktop.
Error with trait implementation
error[E0277]: the trait bound `fn(gc::Gc<js::value::ValueData>, gc::Gc<js::value::ValueData>, std::vec::Vec<gc::Gc<js::value::ValueData>>) -> std::result::Result<gc::Gc<js::value::ValueData>, gc::Gc<js::value::ValueData>> {js::string::get_string_length}: js::value::ToValue` is not satisfied
--> src/lib\js\string.rs:25:14
|
25 | get: to_value(get_string_length),
| ^^^^^^^^ the trait `js::value::ToValue` is not implemented for `fn(gc::Gc<js::value::ValueData>, gc::Gc<js::value::ValueData>, std::vec::Vec<gc::Gc<js::value::ValueData>>) -> std::result::Result<gc::Gc<js::value::ValueData>, gc::Gc<js::value::ValueData>> {js::string::get_string_length}`
|
note: required by `js::value::to_value`
--> src/lib\js\value.rs:632:1
|
632| pub fn to_value<A: ToValue>(v: A) -> Value {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment