Skip to content
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

Implement DerefMut for String, enabling make_ascii_*case #1157

Closed
SimonSapin opened this issue Jun 11, 2015 · 2 comments
Closed

Implement DerefMut for String, enabling make_ascii_*case #1157

SimonSapin opened this issue Jun 11, 2015 · 2 comments

Comments

@SimonSapin
Copy link
Contributor

The AsciiExt trait has make_ascii_uppercase and make_ascii_lowercase methods that take &mut self. This trait is implemented for str, but there is currently no easy way to get a &mut str value.

&mut str is rarely useful, but ASCII case mapping is one of the rare cases. The intent (see rust-lang/rust#22024 (comment)) was that String would implement DerefMut, making these methods usable on it through deref to &mut str. But that last step has not been done yet. Is it time to do it? Is there a reason not to?

CC @alexcrichton @aturon

@Gankra
Copy link
Contributor

Gankra commented Jun 11, 2015

We should do it.

@alexcrichton
Copy link
Member

I don't think there's a reason to not do it, it just hasn't been done. This is pretty minor though so I'm gonna close this (no need to have a whole issue tracking this).

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

No branches or pull requests

3 participants