Skip to content

Feature request: Drop the iter() from vec. #17301

Closed
@sandeep-datta

Description

@sandeep-datta

Please consider dropping the additional call to iter() in the following code...

let vec = vec![1i, 2i, 3i];
for i in vec.iter() {
    println!("{}", i);
}

Preferred...

for i in vec {
    println!("{}", i);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions