Skip to content

Commit

Permalink
chore(core): fix staticcheck issues (#15140)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-rushakoff committed Feb 23, 2023
1 parent b378be9 commit 79b74ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion core/appconfig/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"cosmossdk.io/core/appmodule"
"cosmossdk.io/core/internal"
"cosmossdk.io/core/internal/testpb"
_ "cosmossdk.io/core/internal/testpb"
)

func expectContainerErrorContains(t *testing.T, option depinject.Config, contains string) {
Expand Down
8 changes: 2 additions & 6 deletions core/appmodule/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ func (f funcOption) apply(initializer *internal.ModuleInitializer) error {
// documentation on the dependency injection system.
func Provide(providers ...interface{}) Option {
return funcOption(func(initializer *internal.ModuleInitializer) error {
for _, provider := range providers {
initializer.Providers = append(initializer.Providers, provider)
}
initializer.Providers = append(initializer.Providers, providers...)
return nil
})
}
Expand All @@ -33,9 +31,7 @@ func Provide(providers ...interface{}) Option {
// invokers impose no additional constraints on the dependency graph. Invoker functions should nil-check all inputs.
func Invoke(invokers ...interface{}) Option {
return funcOption(func(initializer *internal.ModuleInitializer) error {
for _, invoker := range invokers {
initializer.Invokers = append(initializer.Invokers, invoker)
}
initializer.Invokers = append(initializer.Invokers, invokers...)
return nil
})
}

0 comments on commit 79b74ff

Please sign in to comment.