From 7c9b3d154c4d826d4623891c69a60d1a69031e5b Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 30 Jun 2020 14:06:23 +0200 Subject: Remove `entries_without_primitives` --- crates/ra_hir_def/src/item_scope.rs | 6 ------ crates/ra_hir_def/src/resolver.rs | 8 +++----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs index c8dde6f8d..beeb98559 100644 --- a/crates/ra_hir_def/src/item_scope.rs +++ b/crates/ra_hir_def/src/item_scope.rs @@ -83,12 +83,6 @@ impl ItemScope { keys.into_iter().map(move |name| (name, self.get(name))) } - pub fn entries_without_primitives<'a>( - &'a self, - ) -> impl Iterator + 'a { - self.entries() - } - pub fn declarations(&self) -> impl Iterator + '_ { self.defs.iter().copied() } diff --git a/crates/ra_hir_def/src/resolver.rs b/crates/ra_hir_def/src/resolver.rs index 15fdd9019..0bf51eb7b 100644 --- a/crates/ra_hir_def/src/resolver.rs +++ b/crates/ra_hir_def/src/resolver.rs @@ -511,11 +511,9 @@ impl Scope { }); } } - Scope::LocalItemsScope(body) => { - body.item_scope.entries_without_primitives().for_each(|(name, def)| { - f(name.clone(), ScopeDef::PerNs(def)); - }) - } + Scope::LocalItemsScope(body) => body.item_scope.entries().for_each(|(name, def)| { + f(name.clone(), ScopeDef::PerNs(def)); + }), Scope::GenericParams { params, def } => { for (local_id, param) in params.types.iter() { if let Some(name) = ¶m.name { -- cgit v1.2.3