]> git.lizzy.rs Git - rust.git/commit
Implement IndexMut for String and str.
authorSimon Sapin <simon.sapin@exyr.org>
Mon, 15 Jun 2015 16:33:21 +0000 (18:33 +0200)
committerSimon Sapin <simon.sapin@exyr.org>
Mon, 13 Jul 2015 14:21:43 +0000 (16:21 +0200)
commitf9005512a9d84f469b30f0d469ccc401607ce64c
treee1585201e80a2ae90b2ac586f162263a100fbcdc
parent90d61d828f82a830b9edc202dd28bb5b4defc7e9
Implement IndexMut for String and str.

... matching the existing Index impls.
There is no reason not to if String implement DerefMut.

The code removed in `src/librustc/middle/effect.rs` was added in #9750
to prevent things like `s[0] = 0x80` where `s: String`,
but I belive became unnecessary when the Index(Mut) traits were introduced.
src/libcollections/str.rs
src/libcollections/string.rs
src/libcore/str/mod.rs
src/libstd/ascii.rs