lukeed/tidyPublic

perf: skip YAML attach work

attach built a table of every line's nodes even when no comment was
left to place. It now returns at once then, as for most lockfiles.
updatePositions walked the tree by recursion; a node always comes
after its children in the list, so one pass in order does the same.

The vite lockfile formats in 11.7 ms instead of 12.5 ms.
LELuke Edwards authored
3224559Patch
Parent6dd9996
2 files changed+14-9
StackedSplit
crates/tidy/src/yaml/attach.rs+13 −7
crates/tidy/src/yaml/mod.rs+1 −2