Apply go fix modernizations
This commit is contained in:
@@ -49,12 +49,7 @@ func (t *TimelineTrack) cellTypeAt(index int, types ...CellType) bool {
|
||||
if index < 0 || index >= len(t.Cells) {
|
||||
return false
|
||||
}
|
||||
for _, typ := range types {
|
||||
if t.Cells[index].Type == typ {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
return slices.Contains(types, t.Cells[index].Type)
|
||||
}
|
||||
|
||||
func (c *TimelineCell) String() string {
|
||||
@@ -98,14 +93,15 @@ func (g exclusiveGroup) satisfied(tracks []*TimelineTrack) bool {
|
||||
}
|
||||
|
||||
func (g exclusiveGroup) String() string {
|
||||
s := "exclusive("
|
||||
var s strings.Builder
|
||||
s.WriteString("exclusive(")
|
||||
for i, m := range g.members {
|
||||
if i > 0 {
|
||||
s += ", "
|
||||
s.WriteString(", ")
|
||||
}
|
||||
s += m.String()
|
||||
s.WriteString(m.String())
|
||||
}
|
||||
return s + ")"
|
||||
return s.String() + ")"
|
||||
}
|
||||
|
||||
func (tl *Timeline) debugf(format string, args ...any) {
|
||||
|
||||
Reference in New Issue
Block a user