From 127e052a5a697854c3c1cd0502bfb23cac063094 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Mon, 21 Aug 2023 05:03:17 -0700 Subject: [PATCH] Make an implementation note on version-sorting accurate --- src/doc/style-guide/src/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doc/style-guide/src/README.md b/src/doc/style-guide/src/README.md index dd80966d15c1..7a6ebc8f5652 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.