forked from cerc-io/plugeth
Proper delete
This commit is contained in:
parent
82be305496
commit
b55e017e62
@ -18,7 +18,7 @@ func (self Bytes) String() string {
|
|||||||
func DeleteFromByteSlice(s [][]byte, hash []byte) [][]byte {
|
func DeleteFromByteSlice(s [][]byte, hash []byte) [][]byte {
|
||||||
for i, h := range s {
|
for i, h := range s {
|
||||||
if bytes.Compare(h, hash) == 0 {
|
if bytes.Compare(h, hash) == 0 {
|
||||||
return append(s[:i], s[i+1:]...)
|
return append(s[:i:i], s[i+1:]...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user