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
Problem
src: if lang_code() == "en" { "image.png" } else { "{lang_code()}/image.png" }
Errors with:
error[E0308]: `if` and `else` have incompatible types ... expected `&str`, found `String`
But this works:
src: if lang_code() == "en" { "image.png".to_string() } else { "{lang_code()}/image.png" }
However @ealmloff agrees that this should be handled automatically by the rsx: https://discord.com/channels/899851952891002890/1288251857457647698/1288288455960301690
Environment:
Questionnaire
The text was updated successfully, but these errors were encountered:
Does it mean the types in the if branches can now be different? Isn't this not very Rusty?
Sorry, something went wrong.
ealmloff
Successfully merging a pull request may close this issue.
Problem
Errors with:
But this works:
However @ealmloff agrees that this should be handled automatically by the rsx:
https://discord.com/channels/899851952891002890/1288251857457647698/1288288455960301690
Environment:
Questionnaire
The text was updated successfully, but these errors were encountered: