mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-01-12 17:09:28 -05:00
Replace transmute in example with cast (#153)
This commit is contained in:
parent
38057132cc
commit
b7fa3341cb
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@
|
|||
//! code.to_rust_string_lossy(scope);
|
||||
//! let mut script = v8::Script::compile(scope, context, code, None).unwrap();
|
||||
//! let result = script.run(scope, context).unwrap();
|
||||
//! let result: v8::Local<v8::String> = unsafe { std::mem::transmute_copy(&result) };
|
||||
//! let result = unsafe { v8::Local::<v8::String>::cast(result) };
|
||||
//! let str = result.to_rust_string_lossy(scope);
|
||||
//! println!("{}", str);
|
||||
//!
|
||||
|
|
Loading…
Reference in a new issue