Skip to content

Commit a6b9dc7

Browse files
alecthomasclaude
andcommitted
refactor: remove redundant re-sort of styles in chromad
ctx.Styles is built by iterating styles.Names(), which already returns names sorted, so the sort.Slice was wasted work. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent bff8721 commit a6b9dc7

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

cmd/chromad/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,6 @@ func newContext(r *http.Request) context {
178178
Counterpart: s.Counterpart,
179179
})
180180
}
181-
sort.Slice(ctx.Styles, func(i, j int) bool {
182-
return ctx.Styles[i].Name < ctx.Styles[j].Name
183-
})
184181
return ctx
185182
}
186183

0 commit comments

Comments
 (0)