about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2023-08-21 18:42:44 -0700
committerJosh Triplett <josh@joshtriplett.org>2023-08-21 18:42:44 -0700
commit95eb1e206ca562a27762bd8c4cbd88bb26c1e115 (patch)
treef62f46ad9f04bc5ebbf1c7aefd676c31aff084d1
parent47bb0761e60f51bcea39aac5792b2e0e8dd03f71 (diff)
downloadrust-95eb1e206ca562a27762bd8c4cbd88bb26c1e115.tar.gz
rust-95eb1e206ca562a27762bd8c4cbd88bb26c1e115.zip
Streamline description of versionsort (incorporate suggestion from Ralf)
-rw-r--r--src/doc/style-guide/src/README.md7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/doc/style-guide/src/README.md b/src/doc/style-guide/src/README.md
index 9c81a25e627..62f463ee2f0 100644
--- a/src/doc/style-guide/src/README.md
+++ b/src/doc/style-guide/src/README.md
@@ -112,10 +112,9 @@ For the purposes of the Rust style, to compare two strings for version-sorting:
 - Compare the strings by (Unicode) character as normal, finding the index of
   the first differing character. (If the two strings do not have the same
   length, this may be the end of the shorter string.)
-- For both strings, determine the longest sequence of ASCII digits containing
-  either that character or the character before. (If either string doesn't have
-  such a sequence of ASCII digits, fall back to comparing the strings as
-  normal.)
+- For both strings, determine the longest sequence of ASCII digits that either
+  contains or ends at that index. (If either string doesn't have such a
+  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: after skipping