Skip to content

Replace unimplemented!() with unreachable!()#434

Open
simonrw wants to merge 1 commit intofix/axis-ordering-regionfrom
fix/unimplemented-to-unreachable
Open

Replace unimplemented!() with unreachable!()#434
simonrw wants to merge 1 commit intofix/axis-ordering-regionfrom
fix/unimplemented-to-unreachable

Conversation

@simonrw
Copy link
Owner

@simonrw simonrw commented Feb 10, 2026

Summary

  • Three call sites in FitsFile::open, FitsFile::edit, and NewFitsFile::open used unimplemented!() for the case where cfitsio returns success but a null pointer
  • This case should be impossible, so unreachable!() better conveys the intent
  • unimplemented!() misleadingly suggested a missing feature

Stacked on #433

Test plan

  • All existing tests pass

🤖 Generated with Claude Code

…uccess

These branches handle the case where cfitsio returns success but a null
pointer, which should be impossible. Using unreachable!() better conveys
this intent, while unimplemented!() misleadingly suggests a missing feature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/unimplemented-to-unreachable

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.5%. Comparing base (4ba6af5) to head (b81f944).

Files with missing lines Patch % Lines
fitsio/src/fitsfile.rs 0.0% 3 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
fitsio/src/fitsfile.rs 94.8% <0.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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