summary refs log tree commit diff
path: root/src/libstd/ffi/os_str.rs
AgeCommit message (Collapse)AuthorLines
2017-10-20Fix most rendering warnings from switching to CommonMarksteveklabnik-2/+1
2017-10-13Rollup merge of #44855 - federicomenaquintero:master, r=steveklabnikkennytm-2/+49
Improved docs for CStr, CString, OsStr, OsString This expands the documentation for those structs and their corresponding traits, per https://github.com/rust-lang/rust/issues/29354
2017-10-02Fix broken links in documentationFederico Mena Quintero-3/+3
2017-09-30Cast inner type in OsStr::bytesNikolai Vazquez-1/+1
The innermost type is not [u8] on all platforms but is assumed to have the same memory layout as [u8] since this conversion was done via mem::transmute before.
2017-09-28Remove unused 'mem' import in 'os_str' moduleNikolai Vazquez-1/+0
2017-09-28Remove mem::transmute used in OsStr conversionsNikolai Vazquez-7/+10
2017-09-26os_str: Fix too-long linesFederico Mena Quintero-4/+4
2017-09-25Overhaul the documentation for OsString / OsStrFederico Mena Quintero-2/+49
2017-08-15Fix typos & us spellingsFourchaux-1/+1
2017-07-25std: Stabilize the `str_{mut,box}_extras` featureAlex Crichton-2/+0
Stabilizes * `<&mut str>::as_bytes_mut` * `<Box<str>>::into_boxed_bytes` * `std::str::from_boxed_utf8_unchecked` * `std::str::from_utf8_mut` * `std::str::from_utf8_unchecked_mut` Closes #41119
2017-07-25std: Stabilize CString/OsString/PathBuf extra methodsAlex Crichton-2/+2
Stabilizes: * `CString::as_c_str` * `CString::into_boxed_c_str` * `CStr::into_c_string` * `OsString::into_boxed_os_str` * `OsStr::into_os_string` * `PathBuf::into_boxed_path` * `PathBuf::into_path_buf` Closes #40380
2017-07-04Rollup merge of #42227 - ollie27:into_to_from, r=aturonMark Simulacrum-4/+4
Convert Intos to Froms. This is a resubmission of #42129 without `impl<T> From<Vec<T>> for Box<[T]>`.
2017-06-28Auto merge of #42745 - sfackler:1.19-stabilization, r=alexcrichtonbors-3/+1
1.19 stabilization r? @alexcrichton
2017-06-25Reword OsStr docs to clarify that utf8 may contain nullsCasey Rodarmor-1/+1
2017-06-24Stabilize OsString::shrink_to_fitSteven Fackler-3/+1
Closes #40421
2017-06-21Update version numbers for From implsOliver Middleton-1/+1
2017-06-21Convert Intos to Froms.Clar Charr-3/+3
2017-06-15Avoid allocations in Debug for os_strStepan Koltsov-6/+12
Fixes #38879
2017-05-24Add missing urls for OsStr docsGuillaume Gomez-3/+9
2017-05-20Remove unused lifetimes.Clar Charr-1/+1
2017-05-20Correct some stability versionsOliver Middleton-2/+2
These were found by running tidy on stable versions of rust and finding features stabilised with the wrong version numbers.
2017-04-18Override ToOwned::clone_into for Path and OsStrScott McMurray-1/+17
The only non-overridden one remaining is the CStr impl, which cannot be optimized as doing so would break CString's second invariant.
2017-03-16Merge branch 'master' into frewsxcv-osstrCorey Farwell-7/+27
2017-03-15Auto merge of #40009 - clarcharr:box_to_buf, r=alexcrichtonbors-7/+27
Leftovers from #39594; From<Box> impls These are a few more impls that follow the same reasoning as those from #39594. What's included: * `From<Box<str>> for String` * `From<Box<[T]>> for Vec<T>` * `From<Box<CStr>> for CString` * `From<Box<OsStr>> for OsString` * `From<Box<Path>> for PathBuf` * `Into<Box<str>> for String` * `Into<Box<[T]>> for Vec<T>` * `Into<Box<CStr>> for CString` * `Into<Box<OsStr>> for OsString` * `Into<Box<Path>> for PathBuf` * `<Box<CStr>>::into_c_string` * `<Box<OsStr>>::into_os_string` * `<Box<Path>>::into_path_buf` * Tracking issue for latter three methods + three from previous PR. Currently, the opposite direction isn't doable with `From` (only `Into`) because of the separation between `liballoc` and `libcollections`. I'm holding off on those for a later PR.
2017-03-14Add doc example for `OsString::into_boxed_os_str`.Corey Farwell-0/+12
2017-03-14Add doc example for `OsString::shrink_to_fit`.Corey Farwell-0/+16
2017-03-14Add doc example for `OsString::reserve_exact`.Corey Farwell-0/+10
2017-03-14Add doc example for `OsString::reserve`.Corey Farwell-0/+10
2017-03-14Add doc example for `OsStr::to_os_string`.Corey Farwell-0/+10
2017-03-10Add From<Box<..>> implementations.Clar Charr-7/+27
2017-03-10OsString::shrink_to_fit.Clar Charr-0/+6
2017-02-14Conversions between CStr/OsStr/Path and boxes.Clar Charr-0/+38
2017-01-22Add missing urls for OsStr and OsStringGuillaume Gomez-9/+28
2017-01-21Add doc examples for `std::ffi::OsString` fucntions/methods.Corey Farwell-0/+73
2017-01-05Expand {Path,OsStr}::{to_str,to_string_lossy} doc examples.Corey Farwell-0/+23
2016-10-01std: Remove plattform-specific code from os_strBrian Anderson-11/+0
2016-09-11Documentation of what does for each typeathulappadan-0/+2
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-3/+1
2016-08-18Add a few doc examples for `std::ffi::OsStr`.Corey Farwell-0/+32
* `std::ffi::OsStr::new`. * `std::ffi::OsStr::is_empty`. * `std::ffi::OsStr::len`.
2016-04-11std: Stabilize APIs for the 1.9 releaseAlex Crichton-26/+26
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-03-22Fix Default for OsString/OsStrWangshan Lu-3/+3
2016-03-22Implement Default for OsStrWangshan Lu-0/+14
2016-03-22Implement Default for OsStringWangshan Lu-0/+14
2016-03-12std: Clean out deprecated APIsAlex Crichton-52/+0
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that are deprecated in the 1.8 release are sticking around for the rest of this cycle. Some notable changes are: * The `dynamic_lib` module was moved into `rustc_back` as the compiler still relies on a few bits and pieces. * The `DebugTuple` formatter now special-cases an empty struct name with only one field to append a trailing comma.
2016-03-10Spell fixes for std::ffi doc commentsCraig M. Brandenburg-3/+3
2016-02-23Auto merge of #31751 - gkoz:os_str_path_cmp, r=aturonbors-0/+38
2016-02-20Add Capacity/length methods for OsString.Corey Farwell-0/+178
https://github.com/rust-lang/rust/issues/29453
2016-02-18Add mutual PartialEq and PartialCmp impls for OsStr, OsStringGleb Kozyrev-0/+38
2016-01-07Move os_str docs to OsString in order to be visible in HTML (fixes #30743)Georg Brandl-23/+17
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-0/+7
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968