‎internal/stream: simplify a min() computation in tests (#727)

This commit is contained in:
udf2457
2026-08-28 23:28:31 +02:00
committed by GitHub
parent a68b8e921b
commit 7c7978c12e
+1 -4
View File
@@ -266,10 +266,7 @@ func TestDecryptReaderAt(t *testing.T) {
// Verify data correctness
if n > 0 && off >= 0 && off < int64(plaintextSize) {
end := int(off) + n
if end > plaintextSize {
end = plaintextSize
}
end := min(int(off)+n, plaintextSize)
if !bytes.Equal(p[:n], plaintext[off:end]) {
t.Errorf("%s: data mismatch", name)
}