Skip to content

Commit

Permalink
Few improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jun 4, 2018
1 parent ebee483 commit 904f492
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/librustdoc/clean/mod.rs
Expand Up @@ -196,16 +196,16 @@ impl<'a, 'tcx, 'rcx> Clean<Crate> for visit_ast::RustdocVisitor<'a, 'tcx, 'rcx>
inner: PrimitiveItem(prim),
}
}));
m.items.extend(keywords.iter().map(|&(def_id, ref kw, ref attrs)| {
m.items.extend(keywords.into_iter().map(|(def_id, kw, attrs)| {
Item {
source: Span::empty(),
name: Some(kw.clone()),
attrs: attrs.clone(),
attrs: attrs,
visibility: Some(Public),
stability: get_stability(cx, def_id),
deprecation: get_deprecation(cx, def_id),
def_id,
inner: KeywordItem(kw.clone()),
inner: KeywordItem(kw),
}
}));
}
Expand Down Expand Up @@ -330,7 +330,6 @@ impl Clean<ExternalCrate> for CrateNum {
hir::ItemUse(ref path, hir::UseKind::Single)
if item.vis == hir::Visibility::Public => {
as_keyword(path.def).map(|(_, prim, attrs)| {
// Pretend the primitive is local.
(cx.tcx.hir.local_def_id(id.id), prim, attrs)
})
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/render.rs
Expand Up @@ -1557,7 +1557,7 @@ impl AllTypes {
typedefs: HashSet::with_capacity(100),
statics: HashSet::with_capacity(100),
constants: HashSet::with_capacity(100),
keywords: HashSet::with_capacity(10),
keywords: HashSet::with_capacity(100),
}
}

Expand Down

0 comments on commit 904f492

Please sign in to comment.