]> git.lizzy.rs Git - rust.git/commit
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)
commitdcb4083ed94d0c14be8f731fca54b4c94fab6b64
treea02dafa2d964066e5986fc8f12ce47bb11bc9e81
parent484c61943f818272719bac81f6d5709fc5456438
parent49ccc3f320a4728b80f393d8a60fa4466f8a4c0c
Rollup merge of #80805 - camelid:iter-by_ref-example, r=steveklabnik

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
library/core/src/iter/traits/iterator.rs