summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/bindings.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/bindings.rs b/core/bindings.rs
index d8337322d..9ece23276 100644
--- a/core/bindings.rs
+++ b/core/bindings.rs
@@ -655,9 +655,8 @@ fn encode(
}
};
let text_str = text.to_rust_string_lossy(scope);
- let text_bytes = text_str.as_bytes().to_vec().into_boxed_slice();
+ let zbuf: ZeroCopyBuf = text_str.into_bytes().into();
- let zbuf: ZeroCopyBuf = text_bytes.into();
rv.set(to_v8(scope, zbuf).unwrap())
}