mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
many more generics
This commit is contained in:
@ -1,17 +1,14 @@
|
||||
package presentation
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/generics/slices"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
)
|
||||
|
||||
func GetSuggestionListDisplayStrings(suggestions []*types.Suggestion) [][]string {
|
||||
lines := make([][]string, len(suggestions))
|
||||
|
||||
for i := range suggestions {
|
||||
lines[i] = getSuggestionDisplayStrings(suggestions[i])
|
||||
}
|
||||
|
||||
return lines
|
||||
return slices.Map(suggestions, func(suggestion *types.Suggestion) []string {
|
||||
return getSuggestionDisplayStrings(suggestion)
|
||||
})
|
||||
}
|
||||
|
||||
func getSuggestionDisplayStrings(suggestion *types.Suggestion) []string {
|
||||
|
Reference in New Issue
Block a user