Skip to content

Commit

Permalink
Merge pull request #88 from pankona/remove-unnecessary-type-specifying
Browse files Browse the repository at this point in the history
Remove unnecessary type descriptions
  • Loading branch information
pavelnikolov authored Feb 24, 2023
2 parents 6941216 + e5debc3 commit f09a0a8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dataloader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ func batchIdentity[K comparable](_ context.Context, keys []K) (results []*Result
var _ctx = context.Background()

func BenchmarkLoader(b *testing.B) {
UserLoader := NewBatchedLoader[string, string](batchIdentity[string])
UserLoader := NewBatchedLoader(batchIdentity[string])
b.ResetTimer()
for i := 0; i < b.N; i++ {
UserLoader.Load(_ctx, (strconv.Itoa(i)))
Expand Down
2 changes: 1 addition & 1 deletion example/lru_cache/golang_lru_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func ExampleGolangLRU() {
}

m := map[int]*User{
5: &User{ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
5: {ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
}

batchFunc := func(_ context.Context, keys []int) []*dataloader.Result[*User] {
Expand Down
2 changes: 1 addition & 1 deletion example/no_cache/no_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func ExampleNoCache() {
}

m := map[int]*User{
5: &User{ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
5: {ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
}

batchFunc := func(_ context.Context, keys []int) []*dataloader.Result[*User] {
Expand Down
2 changes: 1 addition & 1 deletion example/ttl_cache/go_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func ExampleTTLCache() {
}

m := map[int]*User{
5: &User{ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
5: {ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
}

batchFunc := func(_ context.Context, keys []int) []*dataloader.Result[*User] {
Expand Down

0 comments on commit f09a0a8

Please sign in to comment.