Skip to content

Remove OsStrExt #26731

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

Closed
wants to merge 3 commits into from
Closed

Remove OsStrExt #26731

wants to merge 3 commits into from

Conversation

remram44
Copy link
Contributor

@remram44 remram44 commented Jul 2, 2015

Mentioned from #26730, this goes further and totally removes OsStrExt. I don't know if anyone will consider this but I happen to have written it.

GitHub shows previous PR's commits as well because this is how PRs work; this is actually one commit.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Only remaining method is as_bytes(), which can be replaced by
to_bytes().unwrap()
@alexcrichton
Copy link
Member

The OsStrExt extension trait is a stable extension trait in Rust right now, so it cannot be removed without a deprecation path or some other similar means. Additionally it provides a crucial piece of functionality for each platform and is part of the core design of OsStr. The conversion functions that work across platforms aren't intended to be the only way of accessing data as they don't quite convey as much information as you'd need otherwise. As a result I'm going to close this, but thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants