about summary refs log tree commit diff
path: root/src/libstd/sys/unix/env.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-02-15 10:22:34 +0000
committerbors <bors@rust-lang.org>2017-02-15 10:22:34 +0000
commite0044bd3896456afb346d06e91a97ac515930ccf (patch)
tree98fda7ab7d4516750b9bb9c1219f3a93f11ae841 /src/libstd/sys/unix/env.rs
parentea8c62919e5f0c7e511717f672406536ef94cab1 (diff)
parent963843b1b346278fcf6f7f065cabdaaae775a0a1 (diff)
downloadrust-e0044bd3896456afb346d06e91a97ac515930ccf.tar.gz
rust-e0044bd3896456afb346d06e91a97ac515930ccf.zip
Auto merge of #39594 - clarcharr:cstr_box, r=aturon
Conversions between CStr, OsStr, Path and boxes

This closes a bit of the inconsistencies between `CStr`, `OsStr`, `Path`, and `str`, allowing people to create boxed versions of DSTs other than `str` and `[T]`.

Full list of additions:
* `Default` for `Box<str>`, `Box<CStr>`, `Box<OsStr>`, and `Box<Path>` (note: `Default` for `PathBuf` is already implemented)
* `CString::into_boxed_c_str` (feature gated)
* `OsString::into_boxed_os_str` (feature gated)
* `Path::into_boxed_path` (feature gated)
* `From<&CStr> for Box<CStr>`
* `From<&OsStr> for Box<OsStr>`
* `From<&Path> for Box<Path>`

This also includes adding the internal methods:
* `sys::*::os_str::Buf::into_box`
* `sys::*::os_str::Slice::{into_box, empty_box}`
* `sys_common::wtf8::Wtf8Buf::into_box`
* `sys_common::wtf8::Wtf8::{into_box, empty_box}`
Diffstat (limited to 'src/libstd/sys/unix/env.rs')
0 files changed, 0 insertions, 0 deletions