Skip to content

Give "corrected" code in examples #4829

@ChrisJefferson

Description

@ChrisJefferson

clippy recently pointed me to this: https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes

This tells me I should make use of "lifetime elision". I can see an example at the bottom, which does indeed show me something which looks like my code, but nothing seems to tell me how to make use of "lifetime elision". Perhaps every example should also come with a "fixed" version, so readers can see the intended outcome of the suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-documentationArea: Adding or improving documentationgood 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