-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking Issue for split_at_checked #119128
Copy link
Copy link
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: 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.Relevant to the library API team, which will review and decide on the PR/issue.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: 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.Relevant to the library API team, which will review and decide on the PR/issue.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(split_at_checked)].This is a tracking issue for the addition of
split_at_checkedandsplit_at_mut_checkedmethods to[T]andstrtypes which are non-panicking versions ofsplit_atandsplit_at_mutmethods. Rather than panicking when spit index is out of range (likesplit_atdoes), the methods returnNone.Public API
Steps / History
Unresolved Questions
Name of the methods. Some possibilities (suggested in ACP discussion):
split_at_checkedandsplit_at_mut_checked— follows naming ofsplit_at_uncheckedandsplit_at_mut_unchecked. Using suffix makes the names sort nicely together.checked_split_atandchecked_split_at_mut— follows naming convention of arithmetic types (e.g.checked_add). Those new functions serve similar purpose as checked arithmetic operations.try_split_atandtry_split_at_mut— follows naming of various fallible methods such astry_from,try_new,try_for_eachetc. Shortest of the three suggestions.Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩