From e3ce88f6f25901b1d33fbc5f931a9d8f90b9e2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Fri, 18 Jun 2021 14:40:51 +0300 Subject: Minor clippy perf fixes --- crates/hir_ty/src/lower.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_ty/src/lower.rs') diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 817a65c20..ea03b6a6c 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs @@ -562,7 +562,7 @@ impl<'a> TyLoweringContext<'a> { }, ); - ty.unwrap_or(TyKind::Error.intern(&Interner)) + ty.unwrap_or_else(|| TyKind::Error.intern(&Interner)) } else { TyKind::Error.intern(&Interner) } -- cgit v1.2.3