Explorar o código

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

ayn2op hai 4 meses
pai
achega
0f8d561a23
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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))
 			}
 		}
 	}