[PR #13260] model: fix unused result in BenchmarkBytePairEncoding #40009

Open
opened 2026-04-23 01:00:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13260
Author: @uzqw
Created: 11/27/2025
Status: 🔄 Open

Base: mainHead: fix-benchmark-lint


📝 Commits (1)

  • 66f5e03 model: fix unused result in BenchmarkBytePairEncoding

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 model/bytepairencoding_test.go (+1 -1)

📄 Description

go vet reported a "result of slices.Collect call not used" warning in model/bytepairencoding_test.go.

Since this is a benchmark ensuring the iterator is fully consumed and collected, I've assigned the result to the blank identifier _ to silence the linter while preserving the benchmark's behavior.

# Before Fix:
[uzqw@uzqw-lenovo25 ollama]$ go version
go version go1.25.1 X:nodwarf5 linux/amd64
[uzqw@uzqw-lenovo25 ollama]$ go vet ./model/...
# github.com/ollama/ollama/model
# [github.com/ollama/ollama/model]
model/bytepairencoding_test.go:280:5: result of slices.Collect call not used

# After Fix:
[uzqw@uzqw-lenovo25 ollama]$ go vet ./model/...
[uzqw@uzqw-lenovo25 ollama]$ 


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/13260 **Author:** [@uzqw](https://github.com/uzqw) **Created:** 11/27/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-benchmark-lint` --- ### 📝 Commits (1) - [`66f5e03`](https://github.com/ollama/ollama/commit/66f5e031791e3ec33dd6443bd09b357a2f5fb513) model: fix unused result in BenchmarkBytePairEncoding ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `model/bytepairencoding_test.go` (+1 -1) </details> ### 📄 Description `go vet` reported a "result of slices.Collect call not used" warning in `model/bytepairencoding_test.go`. Since this is a benchmark ensuring the iterator is fully consumed and collected, I've assigned the result to the blank identifier `_` to silence the linter while preserving the benchmark's behavior. ``` # Before Fix: [uzqw@uzqw-lenovo25 ollama]$ go version go version go1.25.1 X:nodwarf5 linux/amd64 [uzqw@uzqw-lenovo25 ollama]$ go vet ./model/... # github.com/ollama/ollama/model # [github.com/ollama/ollama/model] model/bytepairencoding_test.go:280:5: result of slices.Collect call not used # After Fix: [uzqw@uzqw-lenovo25 ollama]$ go vet ./model/... [uzqw@uzqw-lenovo25 ollama]$ ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 01:00:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#40009