]> git.lizzy.rs Git - rust.git/commit
Fix off-by-one in String::remove
authordiwic <diwic@users.noreply.github.com>
Sat, 2 Jan 2016 21:36:50 +0000 (22:36 +0100)
committerdiwic <diwic@users.noreply.github.com>
Sat, 2 Jan 2016 21:36:50 +0000 (22:36 +0100)
commit8b398ed8235c518dea5f29d80f8a337b7c6744cf
tree4a1f956e7951ac71786cc25a7c92ac468fd30a65
parent4744472fe03cceb81747ac9c7c64ae5fe6340c0b
Fix off-by-one in String::remove

Obviously we can't remove the character one past the end of the String. And we can't today either - we'll just panic at char_at() instead - but if we're going to keep that assertion, we should at least have a correct assertion.
src/libcollections/string.rs