From c30e486b648c1540a660802a5015aeca208274fa Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 2 Apr 2024 08:43:08 +0900 Subject: Further performance improvements by removing unnecessary copies --- src/ansi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ansi.go') diff --git a/src/ansi.go b/src/ansi.go index e917a4f2..53fae954 100644 --- a/src/ansi.go +++ b/src/ansi.go @@ -312,7 +312,7 @@ func parseAnsiCode(s string, delimiter byte) (int, byte, string) { // Inlined version of strconv.Atoi() that only handles positive // integers and does not allocate on error. code := 0 - for _, ch := range []byte(s) { + for _, ch := range sbytes(s) { ch -= '0' if ch > 9 { return -1, delimiter, remaining -- cgit v1.2.3