rust/src/libcollections
Alex Crichton ae79ce3f03 std: Change String::truncate to panic less
The `Vec::truncate` method does not panic if the length argument is greater than
the vector's current length, but `String::truncate` will indeed panic. This
semantic difference can be a bit jarring (e.g. #32717), and after some
discussion the libs team concluded that although this can technically be a
breaking change it is almost undoubtedly not so in practice.

This commit changes the semantics of `String::truncate` to be a noop if
`new_len` is greater than the length of the current string.

Closes #32717
2016-04-15 10:13:43 -07:00
..
btree std: Stabilize APIs for the 1.9 release 2016-04-11 08:57:53 -07:00
binary_heap.rs Rollup merge of #32607 - tshepang:we-gots-intoiterator, r=apasel422 2016-03-30 10:16:55 -07:00
borrow.rs Add example doc for ToOwned trait 2016-04-05 14:11:08 +02:00
Cargo.toml bootstrap: Add a bunch of Cargo.toml files 2016-02-11 11:12:32 -08:00
enum_set.rs std: Clean out deprecated APIs 2016-03-12 12:31:13 -08:00
fmt.rs std: Clean out deprecated APIs 2016-03-12 12:31:13 -08:00
lib.rs std: Stabilize APIs for the 1.9 release 2016-04-11 08:57:53 -07:00
linked_list.rs Rollup merge of #32177 - srinivasreddy:remove_integer_suffixes, r=steveklabnik 2016-03-28 13:48:28 -04:00
macros.rs Use box syntax in vec! macro 2016-02-25 22:08:23 -05:00
range.rs note work still to be done 2016-02-27 02:01:41 -05:00
slice.rs std: Stabilize APIs for the 1.9 release 2016-04-11 08:57:53 -07:00
str.rs std: Stabilize APIs for the 1.9 release 2016-04-11 08:57:53 -07:00
string.rs std: Change String::truncate to panic less 2016-04-15 10:13:43 -07:00
vec.rs style: Use iter for IntoIterator parameter names 2016-03-28 13:59:38 -04:00
vec_deque.rs style: Use iter for IntoIterator parameter names 2016-03-28 13:59:38 -04:00