There was an error while loading. Please reload this page.
1 parent 2a2db33 commit 96b11ffCopy full SHA for 96b11ff
1 file changed
src/parser.cpp
@@ -1385,14 +1385,14 @@ class CJSLexer {
1385
}
1386
};
1387
1388
-std::optional<lexer_analysis> parse_commonjs(const std::string_view file_contents) {
+std::optional<lexer_analysis> parse_commonjs(std::string_view file_contents) {
1389
last_error.reset();
1390
1391
lexer_analysis result;
1392
CJSLexer lexer(result.exports, result.re_exports);
1393
1394
if (lexer.parse(file_contents)) {
1395
- return result;
+ return result; // NRVO or implicit move applies
1396
1397
1398
return std::nullopt;
0 commit comments