fix warnings by ineffassign, with a one actual issue

In store/search.go, we would make a copy of a byte array, but then still use
the original instead of the copy. Could result in search operations not finding
messages that do have the content, but under very unlikely conditions only.

We'll keep running ineffassign with "make check", useful enough.
This commit is contained in:
Mechiel Lukkien
2025-03-24 10:19:50 +01:00
parent 04b1f030b7
commit 15a8ce8c0b
8 changed files with 15 additions and 15 deletions

View File

@ -187,7 +187,7 @@ func toLower(buf []byte) []byte {
copied = true
nr := make([]byte, len(r), len(r)+nsize+len(buf)-i)
copy(nr, r)
nr = r
r = nr
}
r = utf8.AppendRune(r, nc)
}