1
Fork 0

Box TypedefItem, ImplItem, AssocTypeItem variants of ItemKind

This reduces ItemKind size from 224 bytes to 160 bytes.
This commit is contained in:
est31 2022-07-21 23:14:12 +02:00
parent 0bf65c7c92
commit 96c051fd07
10 changed files with 37 additions and 37 deletions

View file

@ -1160,7 +1160,7 @@ fn render_deref_methods(
.items
.iter()
.find_map(|item| match *item.kind {
clean::AssocTypeItem(ref t, _) => Some(match *t {
clean::AssocTypeItem(box ref t, _) => Some(match *t {
clean::Typedef { item_type: Some(ref type_), .. } => (type_, &t.type_),
_ => (&t.type_, &t.type_),
}),
@ -2054,7 +2054,7 @@ fn sidebar_deref_methods(
debug!("found Deref: {:?}", impl_);
if let Some((target, real_target)) =
impl_.inner_impl().items.iter().find_map(|item| match *item.kind {
clean::AssocTypeItem(ref t, _) => Some(match *t {
clean::AssocTypeItem(box ref t, _) => Some(match *t {
clean::Typedef { item_type: Some(ref type_), .. } => (type_, &t.type_),
_ => (&t.type_, &t.type_),
}),