@@ -639,9 +639,7 @@ func TestCursoredProducerMapperIterator(t *testing.T) {
639639 }
640640
641641 // Cursor converter functions for int
642- intFromString := func (s string ) (int , error ) {
643- return strconv .Atoi (s )
644- }
642+ intFromString := strconv .Atoi
645643
646644 intToString := func (i int ) (string , error ) {
647645 return strconv .Itoa (i ), nil
@@ -1084,9 +1082,7 @@ func TestCursoredProducerMapperIterator(t *testing.T) {
10841082 }
10851083
10861084 // Cursor converter functions for int
1087- intFromString := func (s string ) (int , error ) {
1088- return strconv .Atoi (s )
1089- }
1085+ intFromString := strconv .Atoi
10901086
10911087 intToString := func (i int ) (string , error ) {
10921088 return strconv .Itoa (i ), nil
@@ -1383,9 +1379,7 @@ func TestCursoredProducerMapperIteratorConcurrency1SpecialCase(t *testing.T) {
13831379 ctx := t .Context ()
13841380
13851381 // Cursor converter functions for int
1386- intFromString := func (s string ) (int , error ) {
1387- return strconv .Atoi (s )
1388- }
1382+ intFromString := strconv .Atoi
13891383
13901384 intToString := func (i int ) (string , error ) {
13911385 return strconv .Itoa (i ), nil
@@ -1718,9 +1712,7 @@ func TestConcurrencyConsistency(t *testing.T) {
17181712
17191713 t .Run ("CursoredProducerMapperIterator consistency" , func (t * testing.T ) {
17201714 // Cursor converter functions
1721- intFromString := func (s string ) (int , error ) {
1722- return strconv .Atoi (s )
1723- }
1715+ intFromString := strconv .Atoi
17241716 intToString := func (i int ) (string , error ) {
17251717 return strconv .Itoa (i ), nil
17261718 }
@@ -1972,9 +1964,7 @@ func TestDisableCursorsInContext(t *testing.T) {
19721964 t .Run ("CursoredProducerMapperIterator with cursors disabled" , func (t * testing.T ) {
19731965 ctxWithoutCursors := DisableCursorsInContext (ctx )
19741966
1975- intFromString := func (s string ) (int , error ) {
1976- return strconv .Atoi (s )
1977- }
1967+ intFromString := strconv .Atoi
19781968
19791969 intToString := func (i int ) (string , error ) {
19801970 return strconv .Itoa (i ), nil
@@ -2024,9 +2014,7 @@ func TestDisableCursorsInContext(t *testing.T) {
20242014 })
20252015
20262016 t .Run ("CursoredProducerMapperIterator with cursors enabled" , func (t * testing.T ) {
2027- intFromString := func (s string ) (int , error ) {
2028- return strconv .Atoi (s )
2029- }
2017+ intFromString := strconv .Atoi
20302018
20312019 intToString := func (i int ) (string , error ) {
20322020 return strconv .Itoa (i ), nil
@@ -2071,9 +2059,7 @@ func TestDisableCursorsInContext(t *testing.T) {
20712059 t .Run ("CursoredProducerMapperIterator with cursors disabled concurrency=1" , func (t * testing.T ) {
20722060 ctxWithoutCursors := DisableCursorsInContext (ctx )
20732061
2074- intFromString := func (s string ) (int , error ) {
2075- return strconv .Atoi (s )
2076- }
2062+ intFromString := strconv .Atoi
20772063
20782064 intToString := func (i int ) (string , error ) {
20792065 return strconv .Itoa (i ), nil
0 commit comments