@@ -450,7 +450,7 @@ func BenchmarkRawString(b *testing.B) {
450450 b .ReportAllocs ()
451451 b .ResetTimer ()
452452 for i := 0 ; i < b .N ; i ++ {
453- _ = bsoncore .Document (bs ).StringN (1024 ) // Assuming you want to limit to 1024 bytes for this benchmark
453+ _ , _ = bsoncore .Document (bs ).StringN (1024 ) // Assuming you want to limit to 1024 bytes for this benchmark
454454 }
455455 })
456456 }
@@ -473,7 +473,7 @@ func TestComplexDocuments_StringN(t *testing.T) {
473473 bson , _ := Marshal (tc .doc )
474474 bsonDoc := bsoncore .Document (bson )
475475
476- got := bsonDoc .StringN (tc .n )
476+ got , _ := bsonDoc .StringN (tc .n )
477477 assert .Equal (t , tc .n , len (got ))
478478 })
479479 }
@@ -518,7 +518,7 @@ func createMassiveArraysDocument(arraySize int) D {
518518func createUniqueVoluminousDocument (t * testing.T , size int ) bsoncore.Document {
519519 t .Helper ()
520520
521- docs := make (D , size )
521+ docs := make (D , 0 , size )
522522
523523 for i := 0 ; i < size ; i ++ {
524524 docs = append (docs , E {
@@ -561,7 +561,7 @@ func createLargeSingleDoc(t *testing.T) bsoncore.Document {
561561func createVoluminousArrayDocuments (t * testing.T , size int ) bsoncore.Document {
562562 t .Helper ()
563563
564- docs := make (D , size )
564+ docs := make (D , 0 , size )
565565
566566 for i := 0 ; i < size ; i ++ {
567567 docs = append (docs , E {
0 commit comments