Skip to content

Conversation

hirschenberger
Copy link
Contributor

Add missing braces to example

Add missing braces to example
@steveklabnik
Copy link
Contributor

Because this is an expression, it doesn't need braces, and the style is when it's a single expression, to not use them.

Thank you though!

@hirschenberger
Copy link
Contributor Author

But then it's inconsistently used in the previous section. I was confused reading it and initially thought it's a special syntax for move closures as it appears there for the first time in the closure-section.

@steveklabnik
Copy link
Contributor

Ah! Let's make it consisten there, then?

@hirschenberger
Copy link
Contributor Author

Perhaps mentioning why the braces are missing for clarity. I'm no native speaker, my prose skills are limited ;-)

lnicola pushed a commit to lnicola/rust that referenced this pull request Jul 28, 2025
Add ide-assist: generate_impl_trait for generate_impl
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.

2 participants