refactor(font): remove unnecessary string formatting
Some checks failed
Code QL / code-ql (push) Has been cancelled
Release / changelog (push) Has been cancelled
Release / artifacts (push) Has been cancelled

This commit is contained in:
L. Yeung 2024-08-17 14:03:32 +08:00 committed by Jan De Dobbeleer
parent 2450bb0d6c
commit 1510d207a2

View file

@ -51,8 +51,6 @@ func (d itemDelegate) Render(w io.Writer, m list.Model, index int, listItem list
return
}
str := fmt.Sprintf(i.Name)
fn := itemStyle.Render
if index == m.Index() {
fn = func(s ...string) string {
@ -60,7 +58,7 @@ func (d itemDelegate) Render(w io.Writer, m list.Model, index int, listItem list
}
}
fmt.Fprint(w, fn(str))
fmt.Fprint(w, fn(i.Name))
}
const (