Jelajahi Sumber

perf(messages_list): optimize color conversion by eliminating string allocation

ayn2op 4 bulan lalu
induk
melakukan
0f8d561a23
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      cmd/messages_list.go

+ 1 - 1
cmd/messages_list.go

@@ -159,7 +159,7 @@ func (ml *messagesList) drawAuthor(w io.Writer, message discord.Message) {
 				return r
 			})
 			if ok {
-				foreground = tcell.GetColor(color.String())
+				foreground = tcell.NewHexColor(int32(color))
 			}
 		}
 	}