From 90656f86745afe073a5b590d51b22ec5f6b60e1b Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Thu, 8 Apr 2021 18:45:07 +0200 Subject: Intern consts & lifetimes Slight memory usage reduction. --- crates/hir_ty/src/chalk_ext.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_ty/src/chalk_ext.rs') diff --git a/crates/hir_ty/src/chalk_ext.rs b/crates/hir_ty/src/chalk_ext.rs index 28ed3aac6..8c4542956 100644 --- a/crates/hir_ty/src/chalk_ext.rs +++ b/crates/hir_ty/src/chalk_ext.rs @@ -75,7 +75,7 @@ impl TyExt for Ty { } fn as_reference(&self) -> Option<(&Ty, Lifetime, Mutability)> { match self.kind(&Interner) { - TyKind::Ref(mutability, lifetime, ty) => Some((ty, *lifetime, *mutability)), + TyKind::Ref(mutability, lifetime, ty) => Some((ty, lifetime.clone(), *mutability)), _ => None, } } -- cgit v1.2.3