Skip to content

len_without_is_empty triggers for async len methods, but does not accept async is_empty methods #7232

Closed
@zesterer

Description

@zesterer

The following will trigger the len_without_is_empty error:

impl Foo {
    pub async fn len(&self) -> usize { ... }
    pub async fn is_empty(&self) -> bool { ... }
}

It probably shouldn't expect the exact signature fn(&self) -> bool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't havegood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions