refactor: remove x/exp dep (#21281)
This commit is contained in:
+2
-4
@@ -3,6 +3,7 @@ package types
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"maps"
|
||||
"reflect"
|
||||
"slices"
|
||||
"strings"
|
||||
@@ -10,7 +11,6 @@ import (
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/cosmos/gogoproto/jsonpb"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
)
|
||||
@@ -100,9 +100,7 @@ func TypedEventToEvent(tev proto.Message) (Event, error) {
|
||||
}
|
||||
|
||||
// sort the keys to ensure the order is always the same
|
||||
keys := maps.Keys(attrMap)
|
||||
slices.Sort(keys)
|
||||
|
||||
keys := slices.Sorted(maps.Keys(attrMap))
|
||||
attrs := make([]abci.EventAttribute, 0, len(attrMap))
|
||||
for _, k := range keys {
|
||||
v := attrMap[k]
|
||||
|
||||
@@ -24,12 +24,13 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"maps"
|
||||
"slices"
|
||||
"sort"
|
||||
|
||||
abci "github.com/cometbft/cometbft/api/cometbft/abci/v1"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/spf13/cobra"
|
||||
"golang.org/x/exp/maps"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"cosmossdk.io/core/appmodule"
|
||||
@@ -832,7 +833,7 @@ func (m *Manager) GetVersionMap() appmodule.VersionMap {
|
||||
|
||||
// ModuleNames returns list of all module names, without any particular order.
|
||||
func (m *Manager) ModuleNames() []string {
|
||||
return maps.Keys(m.Modules)
|
||||
return slices.Collect(maps.Keys(m.Modules))
|
||||
}
|
||||
|
||||
// DefaultMigrationsOrder returns a default migrations order: ascending alphabetical by module name,
|
||||
|
||||
Reference in New Issue
Block a user