Skip to content

Commit

Permalink
perf(codegen): avoid unnecessary copy (#2727)
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin committed Mar 15, 2024
1 parent 798a1fd commit 2be5f9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_codegen/src/sourcemap_builder.rs
Expand Up @@ -173,7 +173,7 @@ impl SourcemapBuilder {
});

let remaining = &content.as_bytes()[line_byte_offset..];
for (mut byte_offset_from_line_start, b) in remaining.iter().copied().enumerate() {
for (mut byte_offset_from_line_start, b) in remaining.iter().enumerate() {
match b {
b'\n' => {
byte_offset_from_line_start += 1;
Expand Down

0 comments on commit 2be5f9d

Please sign in to comment.