Skip to content

Commit

Permalink
Remove a byte conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Jan 13, 2024
1 parent 00bdb36 commit f786834
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/transport/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
Expand All @@ -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 {
Expand Down

0 comments on commit f786834

Please sign in to comment.