Преглед изворни кода

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

ayn2op пре 4 месеци
родитељ
комит
0f8d561a23
1 измењених фајлова са 1 додато и 1 уклоњено
  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))
 			}
 		}
 	}