Skip to content

Split out slide for IntoIterator on references - #3281

Merged
fw-immunant merged 2 commits into
google:mainfrom
randomPoison:legare/intoiterator-refs
Sep 28, 2026
Merged

fw-immunant merged 2 commits into
google:mainfrom
randomPoison:legare/intoiterator-refs

Conversation

@randomPoison

Copy link
Copy Markdown
Collaborator

Currently the slide on IntoIterator demonstrates implementing it directly on a type, and then links to a playground in order to demonstrate implementing IntoIterator on references. This PR pulls that playground out into its own slide and adds some speaker notes to guide the discussion and call out how this pattern is used in the standard library.

This is how I've been teaching this section for a while, and I think it goes pretty smoothly, so it's probably worth making into an actual slide.

@fw-immunant fw-immunant left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few tweaks commented inline, but this is a good change; the flow of teaching this can be annoying with the current slides.

Comment thread src/iterators/intoiterator-refs.md
Comment thread src/iterators/intoiterator.md Outdated
- Update speaker note on IntoIterator slide.
- Update GridRefIter to return &u32 to be more idiomatic.
- Update linked playground to match code in the slide.

@fw-immunant fw-immunant left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updates, LGTM.

@fw-immunant
fw-immunant merged commit 2019b27 into google:main Sep 28, 2026
44 checks passed
@randomPoison
randomPoison deleted the legare/intoiterator-refs branch September 28, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants