]> git.lizzy.rs Git - rust.git/commit
Add more examples to lexicographic cmp on Iterators.
authorHanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
Sat, 29 Aug 2020 23:01:41 +0000 (19:01 -0400)
committerHanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
Sat, 29 Aug 2020 23:01:41 +0000 (19:01 -0400)
commitcc3b2f9e1da2bb1bf2eda2e265687ed028cb0e22
treeeefe0c3ff4dc4dc6a290b51397b68da3f2cafadd
parent2c3dc04ea4071805fbd1b07bd726c1daf03c0384
Add more examples to lexicographic cmp on Iterators.

The most important rule of lexicographical comparison is that two arrays
of equal length will be compared until the first difference occured.

The examples provided only focuses on the second rule that says that the
shorter array will be filled with some T2 that is less than every T.
Which is only possible because of the first rule.
library/core/src/iter/traits/iterator.rs