Skip to content

Remove the unsafe codes in trim by using Pattern #12597

@Rachelint

Description

@Rachelint

Is your feature request related to a problem or challenge?

Because Pattern is still the unstable feature in rust, we introdce unsafe codes to get offset of the trimmed str(related disscussion #12387).
We can remove such codes once Pattern become stable, so that we can get such offset through safe way.

Describe the solution you'd like

Use Pattern to get the offset of trimmed str rather unsafe codes.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions