Skip to content

Commit a8a3a33

Browse files
committed
use std::array
1 parent 5d805a1 commit a8a3a33

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/node_contextify.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,11 +1647,11 @@ static const auto throws_only_in_cjs_error_messages =
16471647
"await is only valid in async functions and "
16481648
"the top level bodies of modules"};
16491649

1650-
static std::vector<std::string_view> maybe_top_level_await_errors = {
1651-
// example: `func(await 1);`
1652-
"missing ) after argument list",
1653-
// example: `if(await 1)`
1654-
"SyntaxError: Unexpected"};
1650+
static const auto maybe_top_level_await_errors =
1651+
std::array<std::string_view, 2>{// example: `func(await 1);`
1652+
"missing ) after argument list",
1653+
// example: `if(await 1)`
1654+
"SyntaxError: Unexpected"};
16551655

16561656
// If cached_data is provided, it would be used for the compilation and
16571657
// the on-disk compilation cache from NODE_COMPILE_CACHE (if configured)

0 commit comments

Comments
 (0)