diff --git a/crates/napi/src/bindgen_runtime/js_values/buffer.rs b/crates/napi/src/bindgen_runtime/js_values/buffer.rs index 4133bb80..4c6c73f0 100644 --- a/crates/napi/src/bindgen_runtime/js_values/buffer.rs +++ b/crates/napi/src/bindgen_runtime/js_values/buffer.rs @@ -92,6 +92,12 @@ impl Clone for Buffer { } } +impl Default for Buffer { + fn default() -> Self { + Self::from(Vec::default()) + } +} + impl From> for Buffer { fn from(mut data: Vec) -> Self { let inner_ptr = data.as_mut_ptr();