Skip to content

Purge map(|&x| x) et al #22243

Closed
Closed
@Gankra

Description

@Gankra

Option and IteratorExt both have .cloned() which is sugar for this operation.

AKA

  • .map(|x| *x)
  • .map(|x| x.clone())
  • .map(|x| (*x).clone()) (yes, really)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions