mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-01-13 01:22:42 -05:00
Remove mut from Example in lib.rs (#523)
This commit removes mut from the script variable to avoid the following warning if used: 25 | let mut script = v8::Script::compile(scope, code, None).unwrap(); | ----^^^^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default warning: 1 warning emitted
This commit is contained in:
parent
0f772d7a31
commit
0e54213cc8
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@
|
|||
//! let code = v8::String::new(scope, "'Hello' + ' World!'").unwrap();
|
||||
//! println!("javascript code: {}", code.to_rust_string_lossy(scope));
|
||||
//!
|
||||
//! let mut script = v8::Script::compile(scope, code, None).unwrap();
|
||||
//! let script = v8::Script::compile(scope, code, None).unwrap();
|
||||
//! let result = script.run(scope).unwrap();
|
||||
//! let result = result.to_string(scope).unwrap();
|
||||
//! println!("result: {}", result.to_rust_string_lossy(scope));
|
||||
|
|
Loading…
Reference in a new issue