From be03db0e3a75533f34d48c3014d532919b30a9e9 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Thu, 8 Apr 2021 18:25:18 +0200 Subject: Intern Substitutions (Costs a bit of performance, reduces memory usage on RA by ~10%.) --- crates/hir_ty/src/infer/path.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_ty/src/infer/path.rs') diff --git a/crates/hir_ty/src/infer/path.rs b/crates/hir_ty/src/infer/path.rs index f8955aa32..495282eba 100644 --- a/crates/hir_ty/src/infer/path.rs +++ b/crates/hir_ty/src/infer/path.rs @@ -101,7 +101,7 @@ impl<'a> InferenceContext<'a> { let substs = ctx.substs_from_path(path, typable, true); let ty = TyBuilder::value_ty(self.db, typable) .use_parent_substs(&parent_substs) - .fill(substs.interned()[parent_substs.len(&Interner)..].iter().cloned()) + .fill(substs.as_slice(&Interner)[parent_substs.len(&Interner)..].iter().cloned()) .build(); Some(ty) } -- cgit v1.2.3