summaryrefslogtreecommitdiff
path: root/src/ansi.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-04-02 08:43:08 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-04-02 08:43:08 +0900
commitc30e486b648c1540a660802a5015aeca208274fa (patch)
tree1be9cd9e2890f3ccfb2e671e89e790e9dccbffd2 /src/ansi.go
parenta575c0c54b653050bdb72b4d046ef05967d95c46 (diff)
downloadfzf-c30e486b648c1540a660802a5015aeca208274fa.tar.gz
Further performance improvements by removing unnecessary copies
Diffstat (limited to 'src/ansi.go')
-rw-r--r--src/ansi.go2
1 files changed, 1 insertions, 1 deletions
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