We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
let
case
For example, you have this code:
pub type Wibble { Wibble(wibble: Int) } pub fn main(wibble: Wibble) { let Wibble(inner) = wibble do_something_with(inner) }
But then you change the Wibble type:
Wibble
pub type Wibble { Wibble(wibble: Int) Wobble(wobble: Int) }
The let expression now fails to compile. It could be useful to have a code action to turn:
let Wibble(inner) = wibble
into:
let inner = case wibble { Wibble(inner) -> inner _ -> todo }
This would be very similar to the code action to convert let assert to case, except it would only be offered if the let expression is not exhaustive.
let assert
The text was updated successfully, but these errors were encountered:
I love the idea!
Sorry, something went wrong.
I can work on this. It should be pretty trivial to adapt the existing code action to work in this case too
Successfully merging a pull request may close this issue.
For example, you have this code:
But then you change the
Wibble
type:The
let
expression now fails to compile. It could be useful to have a code action to turn:into:
This would be very similar to the code action to convert
let assert
tocase
, except it would only be offered if thelet
expression is not exhaustive.The text was updated successfully, but these errors were encountered: