From f7868341dbaf61f3524132934439298e6131f239 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sat, 13 Jan 2024 17:18:35 +0100 Subject: [PATCH] Remove a byte conversion --- internal/transport/completion.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/transport/completion.go b/internal/transport/completion.go index 814a5699..4cf10a2d 100644 --- a/internal/transport/completion.go +++ b/internal/transport/completion.go @@ -59,7 +59,7 @@ func (c *Client) GenerateCodeCompletion(toComplete string) []string { // Search forward for the other prefix matches. for i := index; i < 256; i++ { - candidate, match := lookupWordMatch(byte(i), completionMatch, even) + candidate, match := lookupWordMatch(i, completionMatch, even) if !match { break // Sorted in increasing alphabetical order. No more matches. } @@ -70,7 +70,7 @@ func (c *Client) GenerateCodeCompletion(toComplete string) []string { return candidates } -func lookupWordMatch(index byte, prefix string, even bool) (string, bool) { +func lookupWordMatch(index int, prefix string, even bool) (string, bool) { pair := wordlist.RawWords[index] var candidate string if even {