summaryrefslogtreecommitdiff
path: root/deno_typescript/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'deno_typescript/lib.rs')
-rw-r--r--deno_typescript/lib.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/deno_typescript/lib.rs b/deno_typescript/lib.rs
index e239f2011..e9a45d138 100644
--- a/deno_typescript/lib.rs
+++ b/deno_typescript/lib.rs
@@ -225,8 +225,7 @@ fn write_snapshot(
) -> Result<(), ErrBox> {
println!("creating snapshot...");
let snapshot = runtime_isolate.snapshot()?;
- let snapshot_slice =
- unsafe { std::slice::from_raw_parts(snapshot.data_ptr, snapshot.data_len) };
+ let snapshot_slice: &[u8] = &*snapshot;
println!("snapshot bytes {}", snapshot_slice.len());
let snapshot_path = bundle.with_extension("bin");