Skip to content

Commit

Permalink
refactor: Directly swap two variables to optimize code
Browse files Browse the repository at this point in the history
Signed-off-by: jingchanglu <[email protected]>
  • Loading branch information
jingchanglu committed Sep 19, 2024
1 parent ec318b9 commit 2ed72dc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/devp2p/internal/ethtest/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,7 @@ func (a Addresses) Less(i, j int) bool {
}

func (a Addresses) Swap(i, j int) {
tmp := a[i]
a[i] = a[j]
a[j] = tmp
a[i], a[j] = a[j], a[i]
}

func blocksFromFile(chainfile string, gblock *types.Block) ([]*types.Block, error) {
Expand Down

0 comments on commit 2ed72dc

Please sign in to comment.