diff options
author | Aleksey Kladov <[email protected]> | 2018-12-27 17:07:21 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-12-27 17:07:21 +0000 |
commit | d963042ca9da93be8d5922ce46ea26dc6a79c929 (patch) | |
tree | 76f7bfc934dda4e9dfc956fc86fe73379d86a332 /crates/ra_hir/src/query_definitions.rs | |
parent | 3b820bcca3a66660d0c5960f2a5c8f765095333e (diff) |
introduce hir::Name
Diffstat (limited to 'crates/ra_hir/src/query_definitions.rs')
-rw-r--r-- | crates/ra_hir/src/query_definitions.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/query_definitions.rs b/crates/ra_hir/src/query_definitions.rs index 4a7958a12..e6241342a 100644 --- a/crates/ra_hir/src/query_definitions.rs +++ b/crates/ra_hir/src/query_definitions.rs | |||
@@ -11,7 +11,7 @@ use ra_syntax::{ | |||
11 | use ra_db::{SourceRootId, FileId, Cancelable,}; | 11 | use ra_db::{SourceRootId, FileId, Cancelable,}; |
12 | 12 | ||
13 | use crate::{ | 13 | use crate::{ |
14 | SourceFileItems, SourceItemId, DefKind, Function, DefId, | 14 | SourceFileItems, SourceItemId, DefKind, Function, DefId, Name, AsName, |
15 | db::HirDatabase, | 15 | db::HirDatabase, |
16 | function::{FnScopes, FnId}, | 16 | function::{FnScopes, FnId}, |
17 | module::{ | 17 | module::{ |
@@ -130,14 +130,14 @@ pub(crate) fn submodules( | |||
130 | 130 | ||
131 | pub(crate) fn modules<'a>( | 131 | pub(crate) fn modules<'a>( |
132 | root: impl ast::ModuleItemOwner<'a>, | 132 | root: impl ast::ModuleItemOwner<'a>, |
133 | ) -> impl Iterator<Item = (SmolStr, ast::Module<'a>)> { | 133 | ) -> impl Iterator<Item = (Name, ast::Module<'a>)> { |
134 | root.items() | 134 | root.items() |
135 | .filter_map(|item| match item { | 135 | .filter_map(|item| match item { |
136 | ast::ModuleItem::Module(m) => Some(m), | 136 | ast::ModuleItem::Module(m) => Some(m), |
137 | _ => None, | 137 | _ => None, |
138 | }) | 138 | }) |
139 | .filter_map(|module| { | 139 | .filter_map(|module| { |
140 | let name = module.name()?.text(); | 140 | let name = module.name()?.as_name(); |
141 | Some((name, module)) | 141 | Some((name, module)) |
142 | }) | 142 | }) |
143 | } | 143 | } |