diff options
| author | bors <bors@rust-lang.org> | 2023-11-08 01:01:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-08 01:01:58 +0000 |
| commit | 0d5ec963bb9f3e481bca1d0149d26f1688784341 (patch) | |
| tree | 7c398cd691f0f28bca3389d28d1ce1f24ca8e0ae /src/librustdoc/html/render | |
| parent | ff0b4b6091a75ad840035a991426c8bc9fbd93bb (diff) | |
| parent | f72e974e3fa5bd9097ae155e8bb9eb29f25f2d8c (diff) | |
Auto merge of #117692 - matthiaskrgr:rollup-umaf5pr, r=matthiaskrgr
Rollup of 4 pull requests Successful merges: - #113925 (Improve diagnostic for const ctors in array repeat expressions) - #116399 (Small changes w/ `query::Erase<_>`) - #117625 (Fix some clippy perf lints) - #117655 (Method suggestion code tweaks) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/write_shared.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/librustdoc/html/render/write_shared.rs b/src/librustdoc/html/render/write_shared.rs index 3e58dd96ed9..d2c7c578c08 100644 --- a/src/librustdoc/html/render/write_shared.rs +++ b/src/librustdoc/html/render/write_shared.rs @@ -356,15 +356,12 @@ if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; let content = format!( "<h1>List of all crates</h1><ul class=\"all-items\">{}</ul>", - krates - .iter() - .map(|s| { - format!( - "<li><a href=\"{trailing_slash}index.html\">{s}</a></li>", - trailing_slash = ensure_trailing_slash(s), - ) - }) - .collect::<String>() + krates.iter().format_with("", |k, f| { + f(&format_args!( + "<li><a href=\"{trailing_slash}index.html\">{k}</a></li>", + trailing_slash = ensure_trailing_slash(k), + )) + }) ); let v = layout::render(&shared.layout, &page, "", content, &shared.style_files); shared.fs.write(dst, v)?; |
