]> git.lizzy.rs Git - rust.git/commit
Minor fix in the merge_sort comments
authorStjepan Glavina <stjepang@gmail.com>
Sat, 17 Dec 2016 16:36:33 +0000 (17:36 +0100)
committerStjepan Glavina <stjepang@gmail.com>
Sat, 17 Dec 2016 16:48:17 +0000 (17:48 +0100)
commit18ff6410d8c196537fc64a10d9d5b502308eb6fa
treeab791d0752aa80e6d519f9825935f889d7467a82
parentdea7ef3424ec77f855c41bc285603c2d6affef5b
Minor fix in the merge_sort comments

There was an off-by-one error discovered by @tbelaire.
So, the two invariants we are enforcing are:

1. Run lengths are decreasing.
2. Sum of lengths of any two adjacent runs is less than the length of
their predecessor.

This commit changes the comment to be clearer and have correct bounds on `i`.
src/libcollections/slice.rs