soundness(neon): Require `T: 'static` on `JsArrayBuffer::external` and `JsBuffer::external`
Fixes
@@ -43,7 +43,7 @@ impl JsBuffer {
pub fn external<'a, C, T>(cx: &mut C, data: T) -> Handle<'a, Self>
where
C: Context<'a>,
- T: AsMut<[u8]> + Send,
+ T: AsMut<[u8]> + Send + 'static,
{
let env = cx.env().to_raw();
let value = unsafe { neon_runtime::buffer::new_external(env, data) };
@@ -151,7 +151,7 @@ impl JsArrayBuffer {
pub fn external<'a, C, T>(cx: &mut C, data: T) -> Handle<'a, Self>
where
C: Context<'a>,
- T: AsMut<[u8]> + Send,
+ T: AsMut<[u8]> + Send + 'static,
{
let env = cx.env().to_raw();
let value = unsafe { neon_runtime::arraybuffer::new_external(env, data) };
