Skip to content

Fix ineffectual assignment in termio test#1

Merged
aretw0 merged 2 commits intomainfrom
copilot/fix-ineffectual-assignment
Feb 15, 2026
Merged

Fix ineffectual assignment in termio test#1
aretw0 merged 2 commits intomainfrom
copilot/fix-ineffectual-assignment

Conversation

Copy link
Contributor

Copilot AI commented Feb 15, 2026

The ineffassign linter flagged an unused variable assignment in termio/interruptible_test.go:86.

Changes

  • Replace n, err = r.Read(buf) with _, err = r.Read(buf) where the byte count is irrelevant to the test assertion

The test validates only the error type on a subsequent read after cancellation, not the bytes read.

// SUBSEQUENT read should return ErrInterrupted
_, err = r.Read(buf)
if !errors.Is(err, ErrInterrupted) {
    t.Errorf("Expected ErrInterrupted on second read, got %v", err)
}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: aretw0 <14055273+aretw0@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix ineffectual assignment in interruptible_test.go Fix ineffectual assignment in termio test Feb 15, 2026
Copilot AI requested a review from aretw0 February 15, 2026 03:29
@aretw0 aretw0 marked this pull request as ready for review February 15, 2026 03:33
@aretw0 aretw0 merged commit eeb9a04 into main Feb 15, 2026
3 checks passed
@aretw0 aretw0 deleted the copilot/fix-ineffectual-assignment branch February 15, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments