about summary refs log tree commit diff
path: root/src/librustdoc/html/url_parts_builder
AgeCommit message (Collapse)AuthorLines
2022-01-14Document and test `UrlPartsBuilder::push_fmt`Noah Lev-0/+10
2021-12-13rustdoc: Add `UrlPartsBuilder`Noah Lev-0/+54
This is a type for efficiently and easily constructing the part of a URL after the domain: `nightly/core/str/struct.Bytes.html`. It allows simplifying some code and avoiding some allocations in the `href_*` functions. It will also allow making `Cache.paths` et al. use `Symbol` without having to allocate `String`s in the `href_*` functions. `String`s would be necessary otherwise because `Symbol::as_str()` returns `SymbolStr`, whose `Deref<Target = str>` impl requires the `str` to not outlive it. This is the primary motivation for the addition of `UrlPartsBuilder`.