about summary refs log tree commit diff
path: root/src/libstd/sys/windows/os_str.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-216/+0
2020-04-06Forward OsStr::clone_into to the inner VecJosh Stone-0/+4
Despite OS differences, they're all just `Vec<u8>` inside, so we can just forward `clone_into` calls to that optimized implementation.
2020-03-28ascii methods on osstrTyPR124-0/+30
2020-03-20add comment about maintaining OsStr encodingTyPR124-0/+2
2020-03-16make safety comments more explicitTyPR124-4/+4
2020-03-16corrections on safety commentsTyPR124-3/+3
2020-03-16remove #[inline] for consistency in windows/os_strTyPR124-1/+0
2020-03-16add comments about safetyTyPR124-0/+6
2020-03-16allowing getting &mut OsStr from OsStringTyPR124-0/+5
2019-12-09inline some common methods on OsStrLzu Tao-0/+1
2019-11-29Format libstd/sys with rustfmtDavid Tolnay-8/+5
This commit applies rustfmt with rust-lang/rust's default settings to files in src/libstd/sys *that are not involved in any currently open PR* to minimize merge conflicts. THe list of files involved in open PRs was determined by querying GitHub's GraphQL API with this script: https://gist.github.com/dtolnay/aa9c34993dc051a4f344d1b10e4487e8 With the list of files from the script in outstanding_files, the relevant commands were: $ find src/libstd/sys -name '*.rs' \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ rg libstd/sys outstanding_files | xargs git checkout -- Repeating this process several months apart should get us coverage of most of the rest of the files. To confirm no funny business: $ git checkout $THIS_COMMIT^ $ git show --pretty= --name-only $THIS_COMMIT \ | xargs rustfmt --edition=2018 --unstable-features --skip-children $ git diff $THIS_COMMIT # there should be no difference
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-5/+5
2019-02-28libstd => 2018Taiki Endo-7/+7
2018-12-25Remove licensesMark Rousskov-10/+0
2018-03-27Implement `shrink_to` method on collectionsDiggory Blake-0/+5
2017-12-24Capture environment at spawnDiggory Blake-1/+7
2017-11-25Implement `Rc`/`Arc` conversions for string-like typesMurarth-0/+24
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-06-15Avoid allocations in Debug for os_strStepan Koltsov-7/+19
Fixes #38879
2017-03-15Auto merge of #40009 - clarcharr:box_to_buf, r=alexcrichtonbors-0/+6
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-10Add From<Box<..>> implementations.Clar Charr-0/+6
2017-03-10OsString::shrink_to_fit.Clar Charr-0/+4
2017-02-14Conversions between CStr/OsStr/Path and boxes.Clar Charr-0/+14
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-3/+0
2016-02-20Add Capacity/length methods for OsString.Corey Farwell-0/+35
https://github.com/rust-lang/rust/issues/29453
2015-03-26Revise use of conversion traitsAaron Turon-4/+0
This commit revises `path` and `os_str` to use blanket impls for `From` on reference types. This both cuts down on the number of required impls, and means that you can pass through e.g. `T: AsRef<OsStr>` to `PathBuf::from` without an intermediate call to `as_ref`. It also makes a FIXME note for later generalizing the blanket impls for `AsRef` and `AsMut` to use `Deref`/`DerefMut`, once it is possible to do so.
2015-03-02Enable recursion for visit_ty in lint visitorIvan Petkov-2/+3
* The lint visitor's visit_ty method did not recurse, and had a reference to the now closed #10894 * The newly enabled recursion has only affected the `deprectated` lint which now detects uses of deprecated items in trait impls and function return types * Renamed some references to `CowString` and `CowVec` to `Cow<str>` and `Cow<[T]>`, respectively, which appear outside of the crate which defines them * Replaced a few instances of `InvariantType<T>` with `PhantomData<Cell<T>>` * Disabled the `deprecated` lint in several places that reference/implement traits on deprecated items which will get cleaned up in the future * Disabled the `exceeding_bitshifts` lint for compile-fail/huge-array-simple test so it doesn't shadow the expected error on 32bit systems * Unfortunately, this means that if a library declares `#![deny(deprecated)]` and marks anything as deprecated, it will have to disable the lint for any uses of said item, e.g. any impl the now deprecated item For any library that denies deprecated items but has deprecated items of its own, this is a [breaking-change]
2015-02-03Add new path moduleAaron Turon-1/+1
Implements [RFC 474](https://github.com/rust-lang/rfcs/pull/474); see that RFC for details/motivation for this change. This initial commit does not include additional normalization or platform-specific path extensions. These will be done in follow up commits or PRs.
2015-01-24Add ffi::OsString and OsStrAaron Turon-0/+82
Per [RFC 517](https://github.com/rust-lang/rfcs/pull/575/), this commit introduces platform-native strings. The API is essentially as described in the RFC. The WTF-8 implementation is adapted from @SimonSapin's [implementation](https://github.com/SimonSapin/rust-wtf8). To make this work, some encodign and decoding functionality in `libcore` is now exported in a "raw" fashion reusable for WTF-8. These exports are *not* reexported in `std`, nor are they stable.