]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #80805 - camelid:iter-by_ref-example, r=steveklabnik
authorYuki Okushi <jtitor@2k36.org>
Fri, 23 Apr 2021 18:44:02 +0000 (03:44 +0900)
committerGitHub <noreply@github.com>
Fri, 23 Apr 2021 18:44:02 +0000 (03:44 +0900)
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.

cc `@steveklabnik,` who is the one that added the previous version of this example

1  2 
library/core/src/iter/traits/iterator.rs