Skip to content

StrBuf::from_owned_str makes a copy #13508

Closed
@SimonSapin

Description

@SimonSapin

… despite its documentation claiming it doesn’t.

Ideally, we should:

  • Add a no-copy Vec::from_owned_slice, based on Vec::from_raw_parts
  • Change StrBuf::from_owned_str to use Vec::from_owned_slice

Alternatively (or in the meantime), remove the claim from the documentation.

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