From 0e54213cc8a793954b22afb3a1169d7833c0b7ed Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Fri, 13 Nov 2020 21:55:52 +0100 Subject: [PATCH] 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 --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index a6d94f61..5b74132d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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));