about summary refs log tree commit diff
path: root/src/libstd/sys_common/wtf8.rs
AgeCommit message (Collapse)AuthorLines
2019-04-26Use "capacity" as parameter name in with_capacity() methodsMatthias Geier-3/+3
Closes #60271.
2019-04-05Use for_each to extend collectionsJosh Stone-3/+1
This updates the `Extend` implementations to use `for_each` for many collections: `BinaryHeap`, `BTreeMap`, `BTreeSet`, `LinkedList`, `Path`, `TokenStream`, `VecDeque`, and `Wtf8Buf`. Folding with `for_each` enables better performance than a `for`-loop for some iterators, especially if they can just forward to internal iterators, like `Chain` and `FlatMap` do.
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-9/+9
2019-02-28libstd => 2018Taiki Endo-14/+14
2019-02-10libs: doc commentsAlexander Regueiro-5/+5
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-04cleanup: remove static lifetimes from consts in libstdljedrz-1/+1
2018-11-06refactor: use shorthand fieldsteresy-2/+2
2018-08-20Replace usages of ptr::offset with ptr::{add,sub}.Corey Farwell-1/+1
2018-07-27Prefer to_string() to format!()ljedrz-1/+1
2018-06-26migrate codebase to `..=` inclusive range patternsZack M. Davis-6/+6
These were stabilized in March 2018's #47813, and are the Preferred Way to Do It going forward (q.v. #51043).
2018-05-09use fmt::Result where applicableAndre Bogus-2/+2
2018-04-21Remove unused methods on the private Wtf8 typeSimon Sapin-14/+0
The type and its direct parent module are `pub`, but they’re not reachable outside of std
2018-03-27Implement `shrink_to` method on collectionsDiggory Blake-0/+5
2018-03-21Deprecate the AsciiExt trait in favor of inherent methodsSimon Sapin-10/+7
The trait and some of its methods are stable and will remain. Some of the newer methods are unstable and can be removed later. Fixes https://github.com/rust-lang/rust/issues/39658
2018-03-05while let all the thingsleonardo.yvens-14/+9
2017-12-24Capture environment at spawnDiggory Blake-0/+20
2017-12-09Use Try syntax for Option in place of macros or matchMatt Brubeck-4/+1
2017-11-25Implement `Rc`/`Arc` conversions for string-like typesMurarth-0/+14
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-08-13std: Respect formatting flags for str-like OsStrAlex Crichton-3/+7
Historically many `Display` and `Debug` implementations for `OsStr`-like abstractions have gone through `String::from_utf8_lossy`, but this was updated in #42613 to use an internal `Utf8Lossy` abstraction instead. This had the unfortunate side effect of causing a regression (#43765) in code which relied on these `fmt` trait implementations respecting the various formatting flags specified. This commit opportunistically adds back interpretation of formatting trait flags in the "common case" where where `OsStr`-like "thing" is all valid utf-8 and can delegate to the formatting implementation for `str`. This doesn't entirely solve the regression as non-utf8 paths will format differently than they did before still (in that they will not respect formatting flags), but this should solve the regression for all "real world" use cases of paths and such. The door's also still open for handling these flags in the future! Closes #43765
2017-06-15Avoid allocations in Debug for os_strStepan Koltsov-4/+42
Fixes #38879
2017-05-05Update documention in windows::ffiDavid LeGare-0/+1
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/+5
2017-02-14Conversions between CStr/OsStr/Path and boxes.Clar Charr-0/+19
2016-11-01std: Move sys_common to libstd/sys_commonBrian Anderson-0/+1180
Make the directory structure reflect the module structure. I've always found the existing structure confusing.