소스 검색

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))
 			}
 		}
 	}