Skip to content

Commit

Permalink
🚨 tests: explicitly ignores returned error values under benchmarks (e…
Browse files Browse the repository at this point in the history
…rrcheck).
  • Loading branch information
matthewhartstonge committed Feb 22, 2022
1 parent d7c000c commit e7fb412
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions argon2_test.go
Expand Up @@ -135,7 +135,7 @@ func TestSecureZeroMemory(t *testing.T) {

func BenchmarkHash(b *testing.B) {
for i := 0; i < b.N; i++ {
config.Hash(password, salt)
_, _ = config.Hash(password, salt)
}
}

Expand All @@ -148,7 +148,7 @@ func BenchmarkVerify(b *testing.B) {
b.ResetTimer()

for i := 0; i < b.N; i++ {
r.Verify(password)
_, _ = r.Verify(password)
}
}

Expand All @@ -171,7 +171,7 @@ func BenchmarkDecode(b *testing.B) {
b.ResetTimer()

for i := 0; i < b.N; i++ {
argon2.Decode(expectedEncoded)
_, _ = argon2.Decode(expectedEncoded)
}
}

Expand Down

0 comments on commit e7fb412

Please sign in to comment.