Skip to content

Store comments as u8s instead of Strings#839

Open
reese wants to merge 1 commit intotrunkfrom
reese-comment-u8
Open

Store comments as u8s instead of Strings#839
reese wants to merge 1 commit intotrunkfrom
reese-comment-u8

Conversation

@reese
Copy link
Collaborator

@reese reese commented Mar 4, 2026

Part of #832

On the tin -- this is another spot where we assume UTF-8 compatibility where we should be storing plain bytes. This also does one micro-optimization by making comments a Cow, since we don't modify empty comments (used for spacing) or comments that have no indentation (like at the top of a file) and can keep them as slices instead of allocating a Vec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant