rust/src/libstd
bors 83a44c7fa6 auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichton
Now that we have an overloaded comparison (`==`) operator, and that `Vec`/`String` deref to `[T]`/`str` on method calls, many `as_slice()`/`as_mut_slice()`/`to_string()` calls have become redundant. This patch removes them. These were the most common patterns:

- `assert_eq(test_output.as_slice(), "ground truth")` -> `assert_eq(test_output, "ground truth")`
- `assert_eq(test_output, "ground truth".to_string())` -> `assert_eq(test_output, "ground truth")`
- `vec.as_mut_slice().sort()` -> `vec.sort()`
- `vec.as_slice().slice(from, to)` -> `vec.slice(from_to)`

---

Note that e.g. `a_string.push_str(b_string.as_slice())` has been left untouched in this PR, since we first need to settle down whether we want to favor the `&*b_string` or the `b_string[]` notation.

This is rebased on top of #19167

cc @alexcrichton @aturon
2014-12-08 02:32:31 +00:00
..
collections auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichton 2014-12-08 02:32:31 +00:00
comm Fall out of the std::sync rewrite 2014-12-05 09:12:25 -08:00
io auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichton 2014-12-08 02:32:31 +00:00
num libstd: remove unnecessary to_string() calls 2014-12-06 23:53:02 -05:00
path auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichton 2014-12-08 02:32:31 +00:00
rand auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichton 2014-12-08 02:32:31 +00:00
rt auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichton 2014-12-08 02:32:31 +00:00
sync libstd: remove unnecessary to_string() calls 2014-12-06 23:53:02 -05:00
sys auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichton 2014-12-08 02:32:31 +00:00
thread_local Utilize fewer reexports 2014-12-05 18:13:04 -05:00
time auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichton 2014-12-08 02:32:31 +00:00
ascii.rs auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichton 2014-12-08 02:32:31 +00:00
bitflags.rs Utilize fewer reexports 2014-12-05 18:13:04 -05:00
c_vec.rs Utilize fewer reexports 2014-12-05 18:13:04 -05:00
dynamic_lib.rs Utilize fewer reexports 2014-12-05 18:13:04 -05:00
error.rs Utilize fewer reexports 2014-12-05 18:13:04 -05:00
failure.rs Utilize fewer reexports 2014-12-05 18:13:04 -05:00
fmt.rs Utilize fewer reexports 2014-12-05 18:13:04 -05:00
hash.rs /*! -> //! 2014-11-26 16:50:14 -08:00
lib.rs Fall out of the std::sync rewrite 2014-12-05 09:12:25 -08:00
macros.rs Fix example code for unreachable! 2014-11-27 15:31:11 +01:00
os.rs auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichton 2014-12-08 02:32:31 +00:00
prelude.rs rollup merge of #19326: huonw/safer-syntax 2014-11-26 16:50:12 -08:00
rtdeps.rs
task.rs auto merge of #19378 : japaric/rust/no-as-slice, r=alexcrichton 2014-12-08 02:32:31 +00:00