From 6edab8b7cc2f40a7af46628723f1f9287e678332 Mon Sep 17 00:00:00 2001 From: Ayaz Hafiz Date: Tue, 18 Oct 2022 13:53:15 -0500 Subject: [PATCH] Avoid unneeded allocations --- crates/compiler/can/src/def.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/compiler/can/src/def.rs b/crates/compiler/can/src/def.rs index 40ff5b9330..3162449259 100644 --- a/crates/compiler/can/src/def.rs +++ b/crates/compiler/can/src/def.rs @@ -701,8 +701,8 @@ fn synthesize_derived_hash<'a>( // Hash.hash hasher payload let call_member = alloc_expr(ast::Expr::Apply( alloc_expr(ast::Expr::Var { - module_name: env.arena.alloc_str("Hash"), - ident: env.arena.alloc_str("hash"), + module_name: "Hash", + ident: "hash", }), &*env.arena.alloc([ &*alloc_expr(ast::Expr::Var { @@ -757,8 +757,8 @@ fn synthesize_derived_is_eq<'a>( // Bool.isEq payload1 payload2 let call_member = alloc_expr(ast::Expr::Apply( alloc_expr(ast::Expr::Var { - module_name: env.arena.alloc_str("Bool"), - ident: env.arena.alloc_str("isEq"), + module_name: "Bool", + ident: "isEq", }), &*env.arena.alloc([ &*alloc_expr(ast::Expr::Var {