Skip to content

Multiple *stable* iterator adaptors have useless type parameters #21839

Closed
@Tobba

Description

@Tobba

For example

#[stable(feature = "rust1", since = "1.0.0")]
pub struct Peekable<T, I> where I: Iterator<Item=T> {
    iter: I,
    peeked: Option<T>,
}

Here the T type parameter is completely useless as it's always going to be equal to I::Item, and this is present in nearly every iterator adaptor, all which are marked stable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions