rustdoc: avoid many Symbol
to String
conversions.
Particularly when constructing file paths and fully qualified paths. This avoids a lot of allocations, speeding things up on almost all examples.
This commit is contained in:
parent
02c9e73e6c
commit
10b1c9aa8b
13 changed files with 198 additions and 120 deletions
|
@ -562,7 +562,7 @@ pub(super) fn write_shared(
|
|||
|
||||
let mut mydst = dst.clone();
|
||||
for part in &remote_path[..remote_path.len() - 1] {
|
||||
mydst.push(part);
|
||||
mydst.push(part.to_string());
|
||||
}
|
||||
cx.shared.ensure_dir(&mydst)?;
|
||||
mydst.push(&format!("{}.{}.js", remote_item_type, remote_path[remote_path.len() - 1]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue