rust/src/libstd/io
bors b9b396cd75 auto merge of #18463 : japaric/rust/bytes2, r=alexcrichton
- The `BytesContainer::container_into_owned_bytes` method has been removed

- Methods that used to take `BytesContainer` implementors by value, now take them by reference. In particular, this breaks some uses of Path:

``` rust
Path::new("foo")  // Still works
path.join(another_path) -> path.join(&another_path)
```

[breaking-change]

---

Re: `container_into_owned_bytes`, I've removed it because

- Nothing in the whole repository uses it
- Takes `self` by value, which is incompatible with unsized types (`str`)

The alternative to removing this method is to split `BytesContainer` into `BytesContainer for Sized?` and `SizedBytesContainer: BytesContainer + Sized`, where the second trait only contains the `container_into_owned_bytes` method. I tried this alternative [in another branch](https://github.com/japaric/rust/commits/bytes) and it works, but it seemed better not to create a new trait for an unused method.

Re: Breakage of `Path` methods

We could use the idea that @alexcrichton proposed in #18457 (add blanket `impl BytesContainer for &T where T: BytesContainer` + keep taking `T: BytesContainer` by value in `Path` methods) to avoid breaking any code.

r? @aturon 
cc #16918
2014-11-03 12:12:24 +00:00
..
net collections: Remove all collections traits 2014-11-01 11:37:04 -07:00
buffered.rs collections: Remove all collections traits 2014-11-01 11:37:04 -07:00
comm_adapters.rs collections: Remove all collections traits 2014-11-01 11:37:04 -07:00
extensions.rs collections: Remove all collections traits 2014-11-01 11:37:04 -07:00
fs.rs collections: Remove all collections traits 2014-11-01 11:37:04 -07:00
mem.rs collections: Remove all collections traits 2014-11-01 11:37:04 -07:00
mod.rs Add Error impls to a few key error types 2014-11-02 15:31:52 -08:00
pipe.rs Update code with new lint names 2014-10-28 08:54:21 -07:00
process.rs Remove unnecessary allocations 2014-11-01 19:56:07 -05:00
result.rs Rename fail! to panic! 2014-10-29 11:43:07 -04:00
stdio.rs Rename fail! to panic! 2014-10-29 11:43:07 -04:00
tempfile.rs Register new snapshots 2014-10-10 22:09:49 -07:00
test.rs Rename fail! to panic! 2014-10-29 11:43:07 -04:00
timer.rs Rename fail! to panic! 2014-10-29 11:43:07 -04:00
util.rs changes to tests 2014-10-30 15:51:56 +13:00