Skip to content

Use slice instead of array in iterator1#2388

Merged
mo8it merged 1 commit intorust-lang:mainfrom
senekor:senekor/vnopstqrrszn
May 9, 2026
Merged

Use slice instead of array in iterator1#2388
mo8it merged 1 commit intorust-lang:mainfrom
senekor:senekor/vnopstqrrszn

Conversation

@senekor
Copy link
Copy Markdown
Contributor

@senekor senekor commented May 3, 2026

This avoids confusion between .into_iter() and .iter(). On a slice, both methods do the same (correct) thing. Using .into_iter() will result in a clippy warning about the slice not being consumed.

closes #2261

This avoids confusion between `.into_iter()` and `.iter()`. On a slice,
both methods do the same (correct) thing. Using `.into_iter()` will
result in a clippy warning about the slice not being consumed.
@mo8it mo8it merged commit 6c39260 into rust-lang:main May 9, 2026
7 checks passed
@senekor senekor deleted the senekor/vnopstqrrszn branch May 9, 2026 10:37
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.

Using to_iter instead of iter leads to unhelpful errors in iterators1

2 participants