mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-07 13:25:45 +00:00
Address more comments
This commit is contained in:
parent
a0ad457575
commit
20ff1cdcfb
@ -234,10 +234,9 @@ fn collect_items(
|
||||
// FIXME: cfg?
|
||||
AssocItem::Const(id) => {
|
||||
let item = &item_tree[id];
|
||||
let name = if let Some(name) = item.name.clone() {
|
||||
name
|
||||
} else {
|
||||
continue;
|
||||
let name = match item.name.clone() {
|
||||
Some(name) => name,
|
||||
None => continue,
|
||||
};
|
||||
let def = ConstLoc { container, id: ItemTreeId::new(file_id, id) }.intern(db);
|
||||
items.push((name, def.into()));
|
||||
|
@ -136,7 +136,7 @@ impl Ctx {
|
||||
|
||||
fn collect_inner_items(&mut self, container: &SyntaxNode) {
|
||||
let forced_vis = self.forced_visibility.take();
|
||||
let mut inner_items = mem::replace(&mut self.tree.inner_items, FxHashMap::default());
|
||||
let mut inner_items = mem::take(&mut self.tree.inner_items);
|
||||
inner_items.extend(
|
||||
container.descendants().skip(1).filter_map(ast::ModuleItem::cast).filter_map(|item| {
|
||||
let ast_id = self.source_ast_id_map.ast_id(&item);
|
||||
|
Loading…
Reference in New Issue
Block a user