Skip to content

Split ByteSlice::split_at into separate trait #1

Closed
@joshlf

Description

@joshlf

Migrated from https://fxbug.dev/76635

Currently, we don't implement ByteSlice for Vec<u8> because it would be expensive to implement the split_at method. However, most uses of ByteSlice don't make use of this method. We should split ByteSlice into multiple traits and only use the trait with the split_at method where it's actually necessary. Vec can then implement the base trait but not the trait with the split_at method.

Possible names for these traits: ByteSlice and SplittableByteSlice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions