summaryrefslogtreecommitdiff
path: root/core/zero_copy_buf.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/zero_copy_buf.rs')
-rw-r--r--core/zero_copy_buf.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/zero_copy_buf.rs b/core/zero_copy_buf.rs
index a2625b8aa..053576547 100644
--- a/core/zero_copy_buf.rs
+++ b/core/zero_copy_buf.rs
@@ -1,8 +1,11 @@
use crate::bindings;
use rusty_v8 as v8;
+use smallvec::SmallVec;
use std::ops::Deref;
use std::ops::DerefMut;
+pub type BufVec = SmallVec<[ZeroCopyBuf; 2]>;
+
/// A ZeroCopyBuf encapsulates a slice that's been borrowed from a JavaScript
/// ArrayBuffer object. JavaScript objects can normally be garbage collected,
/// but the existence of a ZeroCopyBuf inhibits this until it is dropped. It