Skip to content

False positive in should_implement_trait #5617

@djugei

Description

@djugei

It tells me to impl Iterator. Iterator does not support my use-case.:

pub fn next<'b>(&'b mut self) -> Option<&'b mut S> { }

Rust iterators are not streaming, i.e. an item can live even after .next() has been called a second time. This is a streaming iterator. As such i think the name is perfectly fine.

Maybe check for life-times in the signature to avoid this false positive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions