Skip to content

Add missing line to use_field_init_shorthand "true" example #5523

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

Closed

Conversation

mqudsi
Copy link

@mqudsi mqudsi commented Aug 29, 2022

The last declaration (let b = ...) is where all the difference between the
"false" and "true" cases lies, but it was omitted from the "true" example for
unknown reasons.

Assuming it was by accident, this patch adds the last line from the "false"
example to the "true" example, formatted as it would have been with
use_field_init_shorthand = true.

The last declaration (`let b = ...`) is where all the difference between the
"false" and "true" cases lies, but it was omitted from the "true" example for
unknown reasons.

Assuming it was by accident, this patch adds the last line from the "false"
example to the "true" example, formatted as it would have been with
`use_field_init_shorthand = true`.
@calebcartwright
Copy link
Member

Thanks but I'm going to close for the reasons discussed in #5522 (comment) as I want to avoid any additional toggling we've been doing in the existing config snippet structure (we've done this a bit but almost always find what seems more clear to one person actually muddies things for someone else)

@mqudsi
Copy link
Author

mqudsi commented Aug 29, 2022

Ok, thanks.

@artob
Copy link

artob commented Jun 30, 2025

@calebcartwright I wonder if you might have misunderstood @mqudsi's suggest here? Or else I'm misunderstanding your reply. This PR wasn't asking for any behavioral changes at all, but just correcting a bug in the shown example output of use_field_init_shorthand

(I noticed the same bug in that example myself today, hence why I'm here.)

@ytmimi
Copy link
Contributor

ytmimi commented Jun 30, 2025

The docs were updated in #6562

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.

4 participants