-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): Implement v8::XXX args and return #12
Conversation
@@ -631,4 +637,100 @@ mod tests { | |||
// We don't actually test this one -- we just want it to compile | |||
#[op2(core, fast)] | |||
pub fn op_test_generics<T: Clone>() {} | |||
|
|||
/// Tests v8 types without a handle scope | |||
#[allow(clippy::needless_lifetimes)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be handled by the op itself so we don't need to spam these ignores everywhere in our code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only used here in the tests because the lifetime is useless and I wanted some tests that included it. It works fine without it, but then we're not exercising the lifetime code paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
op2
support forv8::Value
and related types. Functions may take arguments of the form&v8::String
(or&mut v8::String
),v8::Local<v8::String>
, or anOption<...>
of any of these. Under the hood, the op system will check the type of the argument and automatically throw a type error if it does not match.Implements:
v8::String
will work)&mut v8::String
without a handle)Additional changes:
call