refactor(formatter): remove unnecessary clone for experimental_sort_imports option#17065
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Performance ReportMerging #17065 will not alter performanceComparing Summary
Footnotes
|
1d8cd3c to
8c6fa17
Compare
bc2dc61 to
ea7cbec
Compare
experimental_sort_imports option
Merge activity
|
…imports` option (#17065) Remove the unnecessary clone, since `experimental_sort_imports` is a complex struct that is not cheap to clone. I also removed `apply_transform` to avoid a borrow checker problem, as it borrows `&mut self`, and there is already an immutable reference borrowed by `formatted.context().options().experimental_sort_imports`.
ea7cbec to
297eb09
Compare
8c6fa17 to
853f659
Compare

Remove the unnecessary clone, since
experimental_sort_importsis a complex struct that is not cheap to clone. I also removedapply_transformto avoid a borrow checker problem, as it borrows&mut self, and there is already an immutable reference borrowed byformatted.context().options().experimental_sort_imports.