Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing code checks to Error::raw_code() #1153

Merged
merged 1 commit into from
Apr 3, 2025

Conversation

alyssais
Copy link
Contributor

@alyssais alyssais commented Apr 3, 2025

These codes are both already handled by Error::code(), but because they weren't listed in Error::raw_code(), it would return -1, and so the paths in Error::code() for them would never be hit. This fixes the code of errors from Repository::merge_commits() with fail_on_conflict set for me.

@rustbot rustbot added the S-waiting-on-review Status: Waiting on review label Apr 3, 2025
Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Thanks!

These codes are both already handled by Error::code(), but because
they weren't listed in Error::raw_code(), it would return -1, and so
the paths in Error::code() for them would never be hit.  This fixes
the code of errors from Repository::merge_commits() with
fail_on_conflict set for me.
@ehuss ehuss enabled auto-merge April 3, 2025 18:00
@ehuss ehuss added this pull request to the merge queue Apr 3, 2025
Merged via the queue into rust-lang:master with commit b82f801 Apr 3, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Waiting on review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants