From 87e7a0de3fae7ccdd7e2b69908a8875eeb49f24c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= <blaz@mxxn.io>
Date: Fri, 7 May 2021 17:13:26 +0900
Subject: [PATCH] Save space by having the command hashmap use const static
 refs.

---
 helix-term/src/commands.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 338468c2..758d3c49 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -905,13 +905,13 @@ mod cmd {
         },
     ];
 
-    pub static COMMANDS: Lazy<HashMap<&'static str, Command>> = Lazy::new(|| {
+    pub static COMMANDS: Lazy<HashMap<&'static str, &'static Command>> = Lazy::new(|| {
         let mut map = HashMap::new();
 
         for cmd in COMMAND_LIST {
-            map.insert(cmd.name, cmd.clone());
+            map.insert(cmd.name, cmd);
             if let Some(alias) = cmd.alias {
-                map.insert(alias, cmd.clone());
+                map.insert(alias, cmd);
             }
         }