diff --git a/boa/Cargo.toml b/boa/Cargo.toml index a9c83a883b..ffd2d24a7e 100644 --- a/boa/Cargo.toml +++ b/boa/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["javascript", "compiler", "lexer", "parser", "js"] categories = ["parser-implementations", "wasm"] license = "Unlicense/MIT" exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"] -edition = "2018" +edition = "2021" [features] profiler = ["measureme"] diff --git a/boa/src/builtins/bigint/mod.rs b/boa/src/builtins/bigint/mod.rs index 4266725517..925a8e5c89 100644 --- a/boa/src/builtins/bigint/mod.rs +++ b/boa/src/builtins/bigint/mod.rs @@ -259,8 +259,6 @@ impl BigInt { /// Additionally to the wrapped unsigned value it returns the converted `bits` argument, so it /// can be reused from the `as_int_n` method. fn calculate_as_uint_n(args: &[JsValue], context: &mut Context) -> JsResult<(JsBigInt, u32)> { - use std::convert::TryFrom; - let bits_arg = args.get_or_undefined(0); let bigint_arg = args.get_or_undefined(1); diff --git a/boa/src/syntax/parser/expression/assignment/yield.rs b/boa/src/syntax/parser/expression/assignment/yield.rs index 75c2849fa0..2845f148e3 100644 --- a/boa/src/syntax/parser/expression/assignment/yield.rs +++ b/boa/src/syntax/parser/expression/assignment/yield.rs @@ -74,16 +74,10 @@ where if let TokenKind::Punctuator(Punctuator::Mul) = next_token.kind() { cursor.expect(TokenKind::Punctuator(Punctuator::Mul), "token disappeared")?; delegate = true; - expr = Some( - AssignmentExpression::new(self.allow_in, true, self.allow_await) - .parse(cursor)?, - ); - } else { - expr = Some( - AssignmentExpression::new(self.allow_in, true, self.allow_await) - .parse(cursor)?, - ); } + expr = Some( + AssignmentExpression::new(self.allow_in, true, self.allow_await).parse(cursor)?, + ); } Ok(Node::Yield(Yield::new::>( diff --git a/boa_cli/Cargo.toml b/boa_cli/Cargo.toml index 6c5a1bbca8..91b952fffc 100644 --- a/boa_cli/Cargo.toml +++ b/boa_cli/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["javascript", "compiler", "lexer", "parser", "js", "cli"] categories = ["command-line-utilities"] license = "Unlicense/MIT" exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"] -edition = "2018" +edition = "2021" default-run = "boa" [dependencies] diff --git a/boa_tester/Cargo.toml b/boa_tester/Cargo.toml index 0691fcc88a..3b12ad8d2b 100644 --- a/boa_tester/Cargo.toml +++ b/boa_tester/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["javascript", "compiler", "test262", "tester", "js"] categories = ["parser-implementations", "wasm"] license = "Unlicense/MIT" exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"] -edition = "2018" +edition = "2021" [dependencies] Boa = { path = "../boa" } diff --git a/boa_unicode/Cargo.toml b/boa_unicode/Cargo.toml index 049671be8d..07cea42829 100644 --- a/boa_unicode/Cargo.toml +++ b/boa_unicode/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["javascript", "compiler", "lexer", "parser", "unicode"] categories = ["parsing"] license = "Unlicense/MIT" exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"] -edition = "2018" +edition = "2021" [dependencies] unicode-general-category = "0.4.0" diff --git a/boa_wasm/Cargo.toml b/boa_wasm/Cargo.toml index f7be6f475b..83c8585930 100644 --- a/boa_wasm/Cargo.toml +++ b/boa_wasm/Cargo.toml @@ -8,7 +8,7 @@ keywords = ["javascript", "compiler", "lexer", "parser", "js"] categories = ["wasm"] license = "Unlicense/MIT" exclude = ["../.vscode/*", "../Dockerfile", "../Makefile", "../.editorConfig"] -edition = "2018" +edition = "2021" [dependencies] Boa = { path = "../boa", features = ["console"] }