os-rust/library/std
bors 1a44b45987 Auto merge of #113106 - marcospb19:improve-path-with-extension-function, r=thomcc
std: remove an allocation in `Path::with_extension`

`Path::with_extension` used to reallocate (and copy) paths twice per call, now it does it once, by checking the size of the previous and new extensions it's possible to call `PathBuf::with_capacity` and pass the exact capacity required.

This also reduces the memory consumption of the path returned from `Path::with_extension` by using exact capacity instead of using amortized exponential growth.
2023-07-21 03:47:29 +00:00
..
benches mv std libs to library/ 2020-07-27 19:51:13 -05:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Auto merge of #113106 - marcospb19:improve-path-with-extension-function, r=thomcc 2023-07-21 03:47:29 +00:00
tests std: mark common functions in test crate pub(crate) 2023-05-25 08:15:04 -07:00
build.rs wip: Support Apple tvOS in libstd 2023-06-21 14:59:37 -07:00
Cargo.toml use latest version of hermit-abi 2023-07-12 13:15:09 +02:00