-
Notifications
You must be signed in to change notification settings - Fork 1k
[Merged by Bors] - chore(Data/Option): deprecate Option.iget
#33583
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
Conversation
This PR deprecates `Option.iget` in favor of `Option.get!` (which will panic on `none`) or `Option.getD` (which takes an explicit default value). `Option.iget` silently returns `default` on `none`, which can hide bugs. The alternatives make the behavior explicit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
PR summary 8c8bf56c91Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
Thanks! Once CI is happy, please merge this PR using |
|
✌️ kim-em can now approve this pull request. To approve and merge a pull request, simply reply with |
|
Should we deprecate |
- Keep `option_iget` using `@Option.iget` with `set_option linter.deprecated false` - Derive `option_getD_default` from `option_getD` - Fix line length in MeasurableSpace/Pi.lean 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Good idea, but let's do that in a separate PR to keep this one focused. |
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
bors merge |
This PR deprecates `Option.iget` in favor of `Option.get!` (which will panic on `none`) or `Option.getD` (which takes an explicit default value). See [#mathlib4 > `Option.iget` @ 💬](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/.60Option.2Eiget.60/near/565951044) 🤖 Prepared with Claude Code
|
Pull request successfully merged into master. Build succeeded: |
Option.igetOption.iget
This PR deprecates
Option.igetin favor ofOption.get!(which will panic onnone) orOption.getD(which takes an explicit default value).See #mathlib4 > `Option.iget` @ 💬
🤖 Prepared with Claude Code