suyanhanx commented on code in PR #3484:
URL: 
https://github.com/apache/incubator-opendal/pull/3484#discussion_r1387782422


##########
bindings/nodejs/src/lib.rs:
##########
@@ -15,6 +15,8 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#![allow(clippy::not_unsafe_ptr_arg_deref)]

Review Comment:
   The `napi` macro will make sure every parameter and return value's type 
implements `ToNapiValue`, but a pointer (the Box<dyn layer>)can't implement it. 
To pass a pointer to js env, it’s necessary to use this compat mode, the 
`js_function`.



##########
bindings/nodejs/src/lib.rs:
##########
@@ -15,6 +15,8 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#![allow(clippy::not_unsafe_ptr_arg_deref)]

Review Comment:
   The `napi` macro will make sure every parameter and return value's type 
implements `ToNapiValue`, but a pointer (the Box<dyn layer>)can't implement it. 
To pass a pointer to js env, it’s necessary to use this compat mode, the 
`js_function`.



##########
bindings/nodejs/src/lib.rs:
##########
@@ -15,6 +15,8 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#![allow(clippy::not_unsafe_ptr_arg_deref)]

Review Comment:
   The `napi` macro will make sure every parameter and return value's type 
implements `ToNapiValue`, but a pointer (the `Box<dyn layer>`)can't implement 
it. To pass a pointer to js env, it’s necessary to use this compat mode, the 
`js_function`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to