about summary refs log tree commit diff
path: root/src/libstd/ffi/os_str.rs
AgeCommit message (Collapse)AuthorLines
2019-04-04Mark unix::ffi::OsStrExt methods as inlineKonrad Borowski-0/+1
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-4/+4
2019-03-09Use lifetime contravariance to elide more lifetimes in core+alloc+stdScott McMurray-8/+8
2019-02-28libstd => 2018Taiki Endo-12/+12
2019-02-20Rollup merge of #58553 - scottmcm:more-ihle, r=Centrilkennytm-2/+2
Use more impl header lifetime elision Inspired by seeing explicit lifetimes on these two: - https://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#impl-FusedIterator - https://doc.rust-lang.org/nightly/std/primitive.u32.html#impl-Not And a follow-up to https://github.com/rust-lang/rust/pull/54687, that started using IHLE in libcore. Most of the changes in here fall into two big categories: - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop`, `Debug`, and `Clone`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations [where the flipped one cannot elide the lifetime](https://internals.rust-lang.org/t/impl-type-parameter-aliases/9403/2?u=scottmcm). I also removed two lifetimes that turned out to be completely unused; see https://github.com/rust-lang/rust/issues/41960#issuecomment-464557423
2019-02-17Use more impl header lifetime elisionScott McMurray-2/+2
There are two big categories of changes in here - Removing lifetimes from common traits that can essentially never user a lifetime from an input (particularly `Drop` & `Debug`) - Forwarding impls that are only possible because the lifetime doesn't matter (like `impl<R: Read + ?Sized> Read for &mut R`) I omitted things that seemed like they could be more controversial, like the handful of iterators that have a `Item: 'static` despite the iterator having a lifetime or the `PartialEq` implementations where the flipped one cannot elide the lifetime.
2019-02-10libs: doc commentsAlexander Regueiro-1/+1
2019-02-10tests: doc commentsAlexander Regueiro-1/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-12use actual invalid string in OsStr::to_string_lossy exampleLyndon Brown-8/+33
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-03Rollup merge of #56432 - ordovicia:shrink-to-issue, r=Centrilkennytm-1/+1
Update issue number of `shrink_to` methods to point the tracking issue Tracking issue: #56431
2018-12-02Update issue number of `shrink_to` methods to point the tracking issueHidehito Yabuuchi-1/+1
2018-11-21OsStr: clarify `len()` method documentationLyndon Brown-6/+11
2018-11-21OsString: mention storage form in discussionLyndon Brown-0/+7
Helps users to understand capacity related values, which may surpise on Windows. Also is a step towards clarifying understanding of `OsStr`'s len() return value.
2018-09-17OsStr: Document that it's not NUL terminatedColin Walters-1/+4
I somehow got confused into thinking this was the case, but it's definitely not. Let's help the common case of people who have an `OsStr` and need to call e.g. Unix APIs.
2018-09-13Fix the stable release of os_str_str_ref_eqJosh Stone-2/+2
This was added and stabilized in commit 02503029b83a, but while that claimed to be for 1.28.0, it didn't actually make it until 1.29.0.
2018-09-06Fix linkGuillaume Gomez-3/+0
2018-08-11Add links to std::char::REPLACEMENT_CHARACTER from docs.Corey Farwell-1/+3
There are a few places where we mention the replacement character in the docs, and it could be helpful for users to utilize the constant which is available in the standard library, so let’s link to it!
2018-07-23Seperate summaries from rest of the commentMarkus Wein-0/+1
2018-07-16Document From conversions for OsString and OsStrMarkus Wein-0/+21
2018-07-12Rollup merge of #51912 - mbrubeck:more_box_slice_clone, r=alexcrichtonkennytm-0/+8
impl Clone for Box<CStr>, Box<OsStr>, Box<Path> Implements #51908.
2018-07-06impl Clone for Box<CStr>, Box<OsStr>, Box<Path>Matt Brubeck-0/+8
Implements #51908.
2018-06-29Fix stability attributesGabriel Majeri-2/+2
2018-06-29Implement PartialEq between &str and OsStringGabriel Majeri-0/+14
Allows for example `os_string == "something"`
2018-05-09Update features to 1.28.0George Burton-4/+4
2018-04-27Update the stable attributes to use the current nightly version numberGeorge Burton-4/+4
2018-04-27Add cstring_from_cow_cstr and osstring_from_cow_osstrGeorge Burton-0/+8
2018-04-22Implement From for more types on CowGeorge Burton-0/+24
2018-04-16Remove unwanted auto-linking and updateGuillaume Gomez-2/+3
2018-03-27Implement `shrink_to` method on collectionsDiggory Blake-0/+30
2018-01-11s/OsStr/&OsStr in docs to align with &str/String comparisonmuvlon-2/+3
2018-01-11Fix dead links in docs for OsStrmuvlon-0/+2
2018-01-11Fix confusing documentation for OsStrmuvlon-1/+1
2017-12-27Correct a few stability attributesOliver Middleton-4/+4
2017-11-25Implement `Rc`/`Arc` conversions for string-like typesMurarth-0/+58
Provides the following conversion implementations: * `From<`{`CString`,`&CStr`}`>` for {`Arc`,`Rc`}`<CStr>` * `From<`{`OsString`,`&OsStr`}`>` for {`Arc`,`Rc`}`<OsStr>` * `From<`{`PathBuf`,`&Path`}`>` for {`Arc`,`Rc`}`<Path>`
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