| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2022-06-23 | Remove `is_known_utf8` checks from more tests where it's no longer set. | Dan Gohman | -4/+0 | |
| 2022-06-23 | Don't eagerly scan for `is_known_utf8` in `to_ascii_lowercase`/`uppercase`. | Dan Gohman | -4/+0 | |
| 2022-06-23 | Optimize `Wtf8Buf::into_string` for the case where it contains UTF-8. | Dan Gohman | -19/+284 | |
| Add a `is_known_utf8` flag to `Wtf8Buf`, which tracks whether the string is known to contain UTF-8. This is efficiently computed in many common situations, such as when a `Wtf8Buf` is constructed from a `String` or `&str`, or with `Wtf8Buf::from_wide` which is already doing UTF-16 decoding and already checking for surrogates. This makes `OsString::into_string` O(1) rather than O(N) on Windows in common cases. And, it eliminates the need to scan through the string for surrogates in `Args::next` and `Vars::next`, because the strings are already being translated with `Wtf8Buf::from_wide`. Many things on Windows construct `OsString`s with `Wtf8Buf::from_wide`, such as `DirEntry::file_name` and `fs::read_link`, so with this patch, users of those functions can subsequently call `.into_string()` without paying for an extra scan through the string for surrogates. | ||||
| 2022-03-10 | Use implicit capture syntax in format_args | T-O-R-U-S | -2/+2 | |
| This updates the standard library's documentation to use the new syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored). | ||||
| 2021-06-20 | Auto merge of #86463 - fee1-dead:fixed-encode_wide, r=m-ou-se | bors | -0/+12 | |
| Account for self.extra in size_hint for EncodeWide Fixes #86414. | ||||
| 2021-06-19 | Account for self.extra in size_hint for EncodeWide | Deadbeef | -0/+12 | |
| 2021-06-18 | Lint for unused borrows as part of UNUSED_MUST_USE | hi-rustin | -3/+3 | |
| 2020-08-31 | std: move "mod tests/benches" to separate files | Lzu Tao | -0/+397 | |
| Also doing fmt inplace as requested. | ||||
