Skip to content

str api should offer a method to convert a &u8 slice into an &str with same lifetime #5422

Closed
@nikomatsakis

Description

@nikomatsakis

Since strs and vecs share the same representation, there should be a way to "cast" a &u8 slice into an &str with the same lifetime.

There are a few FIXMEs in tydecode where this could save a copy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions