From dc9ce8ff7494f641c7102785cdef95489f2fc3d6 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Mon, 22 Oct 2018 10:50:55 -0400 Subject: Rename new to new_item (to match new_impl) --- crates/ra_editor/src/scope/mod_scope.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'crates/ra_editor/src') diff --git a/crates/ra_editor/src/scope/mod_scope.rs b/crates/ra_editor/src/scope/mod_scope.rs index 8d7e408f8..956ee0e2f 100644 --- a/crates/ra_editor/src/scope/mod_scope.rs +++ b/crates/ra_editor/src/scope/mod_scope.rs @@ -22,14 +22,14 @@ impl ModuleScope { let mut entries = Vec::new(); for item in items { let entry = match item { - ast::ModuleItem::StructDef(item) => Entry::new(item), - ast::ModuleItem::EnumDef(item) => Entry::new(item), - ast::ModuleItem::FnDef(item) => Entry::new(item), - ast::ModuleItem::ConstDef(item) => Entry::new(item), - ast::ModuleItem::StaticDef(item) => Entry::new(item), - ast::ModuleItem::TraitDef(item) => Entry::new(item), - ast::ModuleItem::TypeDef(item) => Entry::new(item), - ast::ModuleItem::Module(item) => Entry::new(item), + ast::ModuleItem::StructDef(item) => Entry::new_item(item), + ast::ModuleItem::EnumDef(item) => Entry::new_item(item), + ast::ModuleItem::FnDef(item) => Entry::new_item(item), + ast::ModuleItem::ConstDef(item) => Entry::new_item(item), + ast::ModuleItem::StaticDef(item) => Entry::new_item(item), + ast::ModuleItem::TraitDef(item) => Entry::new_item(item), + ast::ModuleItem::TypeDef(item) => Entry::new_item(item), + ast::ModuleItem::Module(item) => Entry::new_item(item), ast::ModuleItem::UseItem(item) => { if let Some(tree) = item.use_tree() { collect_imports(tree, &mut entries); @@ -50,7 +50,7 @@ impl ModuleScope { } impl Entry { - fn new<'a>(item: impl ast::NameOwner<'a>) -> Option { + fn new_item<'a>(item: impl ast::NameOwner<'a>) -> Option { let name = item.name()?; Some(Entry { node: name.syntax().owned(), -- cgit v1.2.3