diff options
| author | bors <bors@rust-lang.org> | 2014-11-03 12:12:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-11-03 12:12:24 +0000 |
| commit | b9b396cd7506c2e2aa6737adfa80f3404ed81b9d (patch) | |
| tree | e623507b5799ba153b33c059e6b15a15cd5806ac /src/test | |
| parent | 851799d09e48e06f3fd0c4c6f694af51fc655f9a (diff) | |
| parent | fe256f81401e7af5fb3a3ec069427fd9c52073a9 (diff) | |
| download | rust-b9b396cd7506c2e2aa6737adfa80f3404ed81b9d.tar.gz rust-b9b396cd7506c2e2aa6737adfa80f3404ed81b9d.zip | |
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
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass/process-spawn-with-unicode-params.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/run-pass/process-spawn-with-unicode-params.rs b/src/test/run-pass/process-spawn-with-unicode-params.rs index 9716d79f4c8..490614ef121 100644 --- a/src/test/run-pass/process-spawn-with-unicode-params.rs +++ b/src/test/run-pass/process-spawn-with-unicode-params.rs @@ -48,7 +48,7 @@ fn main() { let child_filestem = Path::new(child_name); let child_filename = child_filestem.with_extension(my_ext); - let child_path = cwd.join(child_filename.clone()); + let child_path = cwd.join(child_filename); // make a separate directory for the child drop(fs::mkdir(&cwd, io::USER_RWX).is_ok()); |
