-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add substring API for OsStr
#118484
Add substring API for OsStr
#118484
Conversation
This comment has been minimized.
This comment has been minimized.
f4ec201
to
e1abb42
Compare
This comment has been minimized.
This comment has been minimized.
6e11da1
to
f545e89
Compare
Should we defer this discussion to the tracking issue? |
This comment has been minimized.
This comment has been minimized.
f545e89
to
77d30e8
Compare
LGTM. r=me after adding some messages to the asserts. Maybe copy what we do for |
I've started work on an implementation with platform logic but maybe that could become a followup PR. |
I buy it. @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (d5fab33): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 672.666s -> 671.733s (-0.14%) |
This adds a method for taking a substring of an
OsStr
, which in combination withOsStr::as_encoded_bytes()
makes it possible to implement most string operations in safe code.API:
Motivation, examples and research at rust-lang/libs-team#306.
Tracking issue: #118485
cc @epage
r? libs-api