Skip to content

Commit 127e052

Browse files
committed
Make an implementation note on version-sorting accurate
1 parent 98d3012 commit 127e052

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/doc/style-guide/src/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ For the purposes of the Rust style, to compare two strings for version-sorting:
117117
sequence of ASCII digits, fall back to comparing the strings as normal.)
118118
- Compare the numeric values of the number specified by the sequence of digits.
119119
(Note that an implementation of this algorithm can easily check this without
120-
accumulating copies of the digits or converting to a number: longer sequences
121-
of digits are larger numbers, equal-length sequences can be sorted
122-
lexicographically.)
120+
accumulating copies of the digits or converting to a number: after skipping
121+
leading zeroes, longer sequences of digits are larger numbers, and
122+
equal-length sequences of digits can be sorted lexicographically.)
123123
- If the numbers have the same numeric value, the one with more leading zeroes
124124
comes first.
125125

0 commit comments

Comments
 (0)