Skip to content

Conversation

ayazhafiz
Copy link
Contributor

For an end user, the number of characters in a string is most likely
interpreted as the number of grapheme clusters in the string,
which may be different than either the number of unicode codepoints or
bytes. Use the number of graphemes to determine list comment alignment
rather than the byte length of the line.

Closes #4151

For an end user, the number of characters in a string is most likely
interpreted as the number of [grapheme cluster](http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)s in the string,
which may be different than either the number of unicode codepoints or
bytes. Use the number of graphemes to determine list comment alignment
rather than the byte length of the line.

Closes rust-lang#4151
Copy link
Contributor

@topecongiro topecongiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@topecongiro topecongiro merged commit f23a41a into rust-lang:master May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rustfmt misaligns comments
3 participants