mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-13 14:34:06 -08:00
refactor(font): remove unnecessary string formatting
This commit is contained in:
parent
2450bb0d6c
commit
1510d207a2
|
@ -51,8 +51,6 @@ func (d itemDelegate) Render(w io.Writer, m list.Model, index int, listItem list
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
str := fmt.Sprintf(i.Name)
|
|
||||||
|
|
||||||
fn := itemStyle.Render
|
fn := itemStyle.Render
|
||||||
if index == m.Index() {
|
if index == m.Index() {
|
||||||
fn = func(s ...string) string {
|
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 (
|
const (
|
||||||
|
|
Loading…
Reference in a new issue