Skip to content

fix: error message for discard#183

Merged
ianlewis merged 1 commit intomainfrom
182-bug-error-message-should-use-derr
Jan 26, 2026
Merged

fix: error message for discard#183
ianlewis merged 1 commit intomainfrom
182-bug-error-message-should-use-derr

Conversation

@ianlewis
Copy link
Copy Markdown
Owner

@ianlewis ianlewis commented Jan 26, 2026

Description:

Fix the error message when discarding runes to use the error message from the discard operation.

Related Issues:

Fixes #182

Checklist:

  • Review the CONTRIBUTING.md documentation.
  • Add a reference to a related issue in the repository.
  • Add a description of the changes proposed in the pull request.
  • Add unit tests if applicable.
  • Update documentation if applicable.
  • Add a note in the CHANGELOG.md if applicable.

Signed-off-by: Ian Lewis <ian@ianlewis.org>
@ianlewis ianlewis linked an issue Jan 26, 2026 that may be closed by this pull request
@ianlewis ianlewis requested a review from Copilot January 26, 2026 09:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an error handling bug where the wrong error variable was being used when reporting discard operation failures, and cleans up error handling logic by renaming variables for clarity.

Changes:

  • Corrected error variable reference in discard error message from err to dErr
  • Renamed err to peekErr throughout the function to distinguish peek errors from discard errors
  • Removed redundant error setting for EOF condition

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ianlewis ianlewis merged commit f672f2a into main Jan 26, 2026
24 checks passed
@ianlewis ianlewis deleted the 182-bug-error-message-should-use-derr branch January 26, 2026 09:09
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.

[bug] Error message should use dErr

2 participants