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 diagnostic for panic/todo in option.unwrap / result.unwrap #3114

Closed
u9g opened this issue May 9, 2024 · 2 comments
Closed

Add diagnostic for panic/todo in option.unwrap / result.unwrap #3114

u9g opened this issue May 9, 2024 · 2 comments

Comments

@u9g
Copy link

u9g commented May 9, 2024

The suggested fix should be maybe_x |> option.lazy_unwrap(fn () { panic }) which is likely what the user wanted, as using maybe_x |> option.unwrap(panic) always panics since the argument isn't lazily evaluated. todo has the same problem as panic here.

@lpil
Copy link
Member

lpil commented May 10, 2024

Hello! This would be covered by this: #3023

@giacomocavalieri
Copy link
Member

Yes, I'm working on #3023 and can confirm that it will fix this problem!

@lpil lpil closed this as completed May 17, 2024
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

No branches or pull requests

3 participants