Switch to Symbol for item.name
This decreases the size of `Item` from 680 to 616 bytes. It also does a lot less work since it no longer has to copy as much.
This commit is contained in:
parent
89fc5034f4
commit
a16904fecf
10 changed files with 78 additions and 45 deletions
|
@ -68,7 +68,7 @@ crate fn krate(mut cx: &mut DocContext<'_>) -> Crate {
|
|||
m.items.extend(primitives.iter().map(|&(def_id, prim)| {
|
||||
Item::from_def_id_and_parts(
|
||||
def_id,
|
||||
Some(prim.to_url_str().to_owned()),
|
||||
Some(prim.as_sym()),
|
||||
ItemKind::PrimitiveItem(prim),
|
||||
cx,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue