From a34eb98a781453a66ce0442e1f7722c0774ae49f Mon Sep 17 00:00:00 2001 From: Ville Penttinen Date: Fri, 22 Feb 2019 00:11:21 +0200 Subject: Make nameres::ResolvePathResult private and refactor --- crates/ra_hir/src/nameres.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs index b18721104..8067b8415 100644 --- a/crates/ra_hir/src/nameres.rs +++ b/crates/ra_hir/src/nameres.rs @@ -304,7 +304,7 @@ where &import.path, ); - (res.module, res.reached_fixedpoint) + (res.resolved_def, res.reached_fixedpoint) }; if reached_fixedpoint != ReachedFixedPoint::Yes { @@ -443,9 +443,9 @@ where } #[derive(Debug, Clone)] -pub struct ResolvePathResult { - pub(crate) module: PerNs, - pub(crate) segment_index: Option, +struct ResolvePathResult { + resolved_def: PerNs, + segment_index: Option, reached_fixedpoint: ReachedFixedPoint, } @@ -455,11 +455,11 @@ impl ResolvePathResult { } fn with( - module: PerNs, + resolved_def: PerNs, reached_fixedpoint: ReachedFixedPoint, segment_index: Option, ) -> ResolvePathResult { - ResolvePathResult { module, reached_fixedpoint, segment_index } + ResolvePathResult { resolved_def, reached_fixedpoint, segment_index } } } @@ -498,7 +498,7 @@ impl ItemMap { path: &Path, ) -> (PerNs, Option) { let res = self.resolve_path_fp(db, ResolveMode::Other, original_module, path); - (res.module, res.segment_index) + (res.resolved_def, res.segment_index) } fn resolve_in_prelude( -- cgit v1.2.3