Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwilliams committed Dec 15, 2021
1 parent 35067d1 commit 2c33e14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion boa_examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ path = "src/loadstring.rs"
name = "loadfile"
path = "src/loadfile.rs"


[[bin]]
name = "enhancedglobal"
path = "src/enhancedglobal.rs"
Expand Down
4 changes: 2 additions & 2 deletions boa_examples/src/loadstring.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! This example shows how to load a JavaScript string and execute it
use boa::{exec::Executable, parse, Context};
use boa::{exec::Executable, parse, Context, JsValue};

pub fn main() {
let js_code = "console.log('Hello World from a JS code string!')";
Expand All @@ -16,7 +16,7 @@ pub fn main() {
eprintln!(
"Uncaught {}",
context
.throw_syntax_error(e.to_string())
.throw_syntax_error::<String, JsValue>(e.to_string())
.expect_err("interpreter.throw_syntax_error() did not return an error")
.display()
);
Expand Down

0 comments on commit 2c33e14

Please sign in to comment.