chore: slices Delete (#24164)

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
lido333
2025-03-31 16:26:44 +00:00
committed by GitHub
co-authored by Alex | Interchain Labs
parent f55595fcc9
commit 8cd9b20cbc
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -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)
}