Skip to content

Commit

Permalink
Fix clippy failure
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvalencik committed Apr 13, 2022
1 parent 4d53ae9 commit 5db68f9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/neon/src/types/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ impl<T: Send + 'static> Managed for JsBox<T> {
self.0.local
}

// This method should be `unsafe`
// https://github.com/neon-bindings/neon/issues/885
// Type tagging could improve safety
// https://github.com/neon-bindings/neon/issues/591
#[allow(clippy::not_unsafe_ptr_arg_deref)]
fn from_raw(env: Env, local: raw::Local) -> Self {
let raw_data = unsafe { maybe_external_deref(env, local) }
.expect("Failed to unwrap napi_external as Box<Any>")
Expand Down

0 comments on commit 5db68f9

Please sign in to comment.