Skip to content

Commit

Permalink
fix: assigning the result of ToOwned::to_owned() may be inefficient
Browse files Browse the repository at this point in the history
Signed-off-by: jaudiger <[email protected]>
  • Loading branch information
jaudiger committed Jul 6, 2024
1 parent e8c3457 commit babd8a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/brioche-core/src/script/compiler_host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl BriocheCompilerHost {
doc.version += 1;

let doc_contents = Arc::make_mut(&mut doc.contents);
*doc_contents = contents.to_owned();
contents.clone_into(doc_contents);
}
})
.or_insert_with(|| {
Expand Down

0 comments on commit babd8a7

Please sign in to comment.