chore: slices Delete (#24164)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
co-authored by
Alex | Interchain Labs
parent
f55595fcc9
commit
8cd9b20cbc
@@ -7,6 +7,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/rand" // #nosec // math/rand is used for random selection and seeded from crypto/rand
|
||||
"slices"
|
||||
"sync"
|
||||
|
||||
"github.com/huandu/skiplist"
|
||||
@@ -307,5 +308,5 @@ func (i *senderNonceMempoolIterator) Tx() sdk.Tx {
|
||||
}
|
||||
|
||||
func removeAtIndex[T any](slice []T, index int) []T {
|
||||
return append(slice[:index], slice[index+1:]...)
|
||||
return slices.Delete(slice, index, index+1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user