Skip to content

Commit

Permalink
Remove unnecessary string slicing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Jan 13, 2024
1 parent b1f9c14 commit ef9096b
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 @@ -45,10 +45,10 @@ func (c *Client) GenerateCodeCompletion(toComplete string) []string {
index := sort.Search(words, func(i int) bool {
pair := wordlist.RawWords[byte(i)]
if even {
return pair.Even[:len(completionMatch)] >= completionMatch
return pair.Even >= completionMatch
}

return pair.Odd[:len(completionMatch)] >= completionMatch
return pair.Odd >= completionMatch
})

var candidates []string
Expand Down

0 comments on commit ef9096b

Please sign in to comment.