mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-02 09:21:40 +02:00
Cleanup: use slices.Delete to delete elements from a slice
I find this much easier to read.
This commit is contained in:
parent
ec22570eac
commit
f680b6e82e
@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/mattn/go-runewidth"
|
||||
"github.com/samber/lo"
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
type Alignment int
|
||||
@ -82,7 +83,7 @@ outer:
|
||||
// remove the columns
|
||||
for i, strings := range displayStringsArr {
|
||||
for j := len(toRemove) - 1; j >= 0; j-- {
|
||||
strings = append(strings[:toRemove[j]], strings[toRemove[j]+1:]...)
|
||||
strings = slices.Delete(strings, toRemove[j], toRemove[j]+1)
|
||||
}
|
||||
displayStringsArr[i] = strings
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user