]> git.lizzy.rs Git - rust.git/commit
Improve `Iterator::by_ref` example
authorCamelid <camelidcamel@gmail.com>
Fri, 8 Jan 2021 01:29:27 +0000 (17:29 -0800)
committerCamelid <camelidcamel@gmail.com>
Fri, 8 Jan 2021 01:41:40 +0000 (17:41 -0800)
commitf7558991adcdf15f1cb1093810c8b05894b12dd3
tree8fd50b2be3b96877d0a68ff380abf38b04ec7f82
parentc8915eebeaaef9f7cc1cff6ffd97f578b03c2ac9
Improve `Iterator::by_ref` example

I split the example into two: one that fails to compile, and one that
works. I also made them identical except for the addition of `by_ref`
so we don't confuse readers with random differences.
library/core/src/iter/traits/iterator.rs