Skip to content

Commit 89d1fc4

Browse files
crrowclaude
andcommitted
fix(lint): remove unused return from handlers
Three handlers (handleDismissToast, handleDismissMessage, handleSizeResult) always returned nil — drop the return value to satisfy unparam linter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 595cd64 commit 89d1fc4

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

internal/worktree/tui.go

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -358,11 +358,11 @@ func (m *tuiModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
358358
var cmd tea.Cmd
359359
switch msg := msg.(type) {
360360
case dismissToastMsg:
361-
cmd = m.handleDismissToast(msg)
361+
m.handleDismissToast(msg)
362362
case dismissMessageMsg:
363-
cmd = m.handleDismissMessage(msg)
363+
m.handleDismissMessage(msg)
364364
case sizeResultMsg:
365-
cmd = m.handleSizeResult(msg)
365+
m.handleSizeResult(msg)
366366
case deleteResultMsg:
367367
cmd = m.handleDeleteResult(msg)
368368
case pruneResultMsg:
@@ -382,26 +382,24 @@ func (m *tuiModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
382382
return m, cmd
383383
}
384384

385-
func (m *tuiModel) handleDismissToast(msg dismissToastMsg) tea.Cmd {
385+
func (m *tuiModel) handleDismissToast(msg dismissToastMsg) {
386386
for i, t := range m.toasts {
387387
if t.id == msg.id {
388388
m.toasts = append(m.toasts[:i], m.toasts[i+1:]...)
389389
break
390390
}
391391
}
392-
return nil
393392
}
394393

395-
func (m *tuiModel) handleDismissMessage(msg dismissMessageMsg) tea.Cmd {
394+
func (m *tuiModel) handleDismissMessage(msg dismissMessageMsg) {
396395
if msg.seq == m.messageSeq {
397396
m.message = ""
398397
}
399-
return nil
400398
}
401399

402-
func (m *tuiModel) handleSizeResult(msg sizeResultMsg) tea.Cmd {
400+
func (m *tuiModel) handleSizeResult(msg sizeResultMsg) {
403401
if msg.generation != m.generation {
404-
return nil
402+
return
405403
}
406404
for i, sz := range msg.sizes {
407405
if i < len(m.entries) {
@@ -410,7 +408,6 @@ func (m *tuiModel) handleSizeResult(msg sizeResultMsg) tea.Cmd {
410408
}
411409
m.sizesLoaded = true
412410
m.refreshRows()
413-
return nil
414411
}
415412

416413
func (m *tuiModel) handleDeleteResult(msg deleteResultMsg) tea.Cmd {

0 commit comments

Comments
 (0)