From faabbf76714851761254f6c338737446971e9f3b Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 22 Jan 2025 14:29:52 +0100 Subject: [PATCH] accounts/abi/bind: fix warning about assignment to blank --- accounts/abi/bind/dep_tree.go | 2 +- accounts/abi/bind/dep_tree_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/accounts/abi/bind/dep_tree.go b/accounts/abi/bind/dep_tree.go index 0ed6bc0b3d..98462a79b2 100644 --- a/accounts/abi/bind/dep_tree.go +++ b/accounts/abi/bind/dep_tree.go @@ -107,7 +107,7 @@ func (d *depTreeDeployer) linkAndDeploy(metadata *MetaData) (common.Address, err // result returns a result for this deployment, or an error if it failed. func (d *depTreeDeployer) result() *DeploymentResult { // remove the override addresses from the resulting deployedAddrs - for pattern, _ := range d.deployedAddrs { + for pattern := range d.deployedAddrs { if _, ok := d.deployerTxs[pattern]; !ok { delete(d.deployedAddrs, pattern) } diff --git a/accounts/abi/bind/dep_tree_test.go b/accounts/abi/bind/dep_tree_test.go index a56fabf4c3..6f1552bb01 100644 --- a/accounts/abi/bind/dep_tree_test.go +++ b/accounts/abi/bind/dep_tree_test.go @@ -97,7 +97,7 @@ type linkTestCaseInput struct { // linkDeps will return a set of root dependencies and their sub-dependencies connected via the Deps field func linkDeps(deps map[string]*MetaData) []*MetaData { roots := make(map[string]struct{}) - for pattern, _ := range deps { + for pattern := range deps { roots[pattern] = struct{}{} } @@ -106,7 +106,7 @@ func linkDeps(deps map[string]*MetaData) []*MetaData { connectedDeps[pattern] = internalLinkDeps(*dep, deps, &roots) //nolint:all } rootMetadatas := []*MetaData{} - for pattern, _ := range roots { + for pattern := range roots { dep := connectedDeps[pattern] //nolint:all rootMetadatas = append(rootMetadatas, &dep) }