Skip to content

Tracking issue for str_checked_slicing #39932

Closed
@nagisa

Description

@nagisa
Member

slice::get_unchecked now takes ranges, whereas str takes explicit usize. str does not provide an explicit method to slice unsafely with ranges either.

Activity

alexcrichton

alexcrichton commented on Feb 21, 2017

@alexcrichton
Member

Should be a relatively easy API to add! I believe this just needs to mirror slices and can likely use the same trait for abstractions.

added
E-help-wantedCall for participation: Help is requested to fix this issue.
on Feb 21, 2017
ghost

ghost commented on Feb 21, 2017

@ghost

i'd like to do it

added
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
and removed on Mar 24, 2017
added a commit that references this issue on Mar 31, 2017

Auto merge of #40737 - nagisa:safe-slicing-strs, r=BurntSushi

added
B-unstableBlocker: Implemented in the nightly compiler and unstable.
and removed
E-help-wantedCall for participation: Help is requested to fix this issue.
on Jun 19, 2017
changed the title [-]API discrepancy between slice::get{,_unchecked} and str::slice_unchecked[/-] [+]Tracking issue for str_checked_slicing[/+] on Jun 19, 2017
Mark-Simulacrum

Mark-Simulacrum commented on Jun 19, 2017

@Mark-Simulacrum
Member

Nominating for libs team discussion -- I think it's reasonable to stabilize this. It's been implemented for about two cycles (PR merged March 31st), I believe. The API surface is fairly small -- extending slice get{,_unchecked} methods to strs. It's possible we should deprecate the slice_unchecked{,_mut} methods as we stabilize this extension -- I believe they are obsoleted by this addition.

alexcrichton

alexcrichton commented on Jun 20, 2017

@alexcrichton
Member

@rfcbot fcp merge

Sounds good to me to stabilize!

17 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @steveklabnik@alexcrichton@brson@frewsxcv@nagisa

        Issue actions

          Tracking issue for str_checked_slicing · Issue #39932 · rust-lang/rust