diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2023-08-21 05:03:17 -0700 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2023-08-21 05:03:17 -0700 |
| commit | 127e052a5a697854c3c1cd0502bfb23cac063094 (patch) | |
| tree | 338b23d01cd10d7c292452693941a17f527ec7f4 | |
| parent | 98d3012ed9fa2a812968fe1dc034670cfb571680 (diff) | |
| download | rust-127e052a5a697854c3c1cd0502bfb23cac063094.tar.gz rust-127e052a5a697854c3c1cd0502bfb23cac063094.zip | |
Make an implementation note on version-sorting accurate
| -rw-r--r-- | src/doc/style-guide/src/README.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/style-guide/src/README.md b/src/doc/style-guide/src/README.md index dd80966d15c..7a6ebc8f565 100644 --- a/src/doc/style-guide/src/README.md +++ b/src/doc/style-guide/src/README.md @@ -117,9 +117,9 @@ For the purposes of the Rust style, to compare two strings for version-sorting: sequence of ASCII digits, fall back to comparing the strings as normal.) - Compare the numeric values of the number specified by the sequence of digits. (Note that an implementation of this algorithm can easily check this without - accumulating copies of the digits or converting to a number: longer sequences - of digits are larger numbers, equal-length sequences can be sorted - lexicographically.) + accumulating copies of the digits or converting to a number: after skipping + leading zeroes, longer sequences of digits are larger numbers, and + equal-length sequences of digits can be sorted lexicographically.) - If the numbers have the same numeric value, the one with more leading zeroes comes first. |
