You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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).
The
AsciiExt
trait hasmake_ascii_uppercase
andmake_ascii_lowercase
methods that take&mut self
. This trait is implemented forstr
, 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 thatString
would implementDerefMut
, 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
The text was updated successfully, but these errors were encountered: