Skip to content

shouldn't we add Add for Cow<'a, str>? #35837

Closed
@llogiq

Description

@llogiq

After some experience, I've changed my mind in Addition for strings. Let's do it for Cow too. The rationale is that we already have the addition via Deref and we can optimize for the case of adding empty strings (or Cows of them, respectively) – we can get rid of one clone in that case.

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