Skip to content

Commit 6a9a69a

Browse files
GCrispinoastavonin
authored andcommitted
Fix unintended line on object-pooling_test.go
This fixes a line with the wrong indentation level in the benchmark code used for the "Object Pooling" page.
1 parent f31b706 commit 6a9a69a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/01-common-patterns/src/object-pooling_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ type Data struct {
1313
// BenchmarkWithoutPooling measures the performance of direct heap allocations.
1414
func BenchmarkWithoutPooling(b *testing.B) {
1515
for b.Loop() {
16-
data := &Data{} // Allocating a new object each time
17-
data.Values[0] = 42 // Simulating some memory activity
16+
data := &Data{} // Allocating a new object each time
17+
data.Values[0] = 42 // Simulating some memory activity
1818
}
1919
}
2020

0 commit comments

Comments
 (0)