Skip to content

Conversation

@nyurik
Copy link
Contributor

@nyurik nyurik commented Nov 30, 2024

.enumerate()
.map(|(i, v)| format!("{}{:?}", if i > 0 { ", " } else { "" }, v))
.collect::<String>()
.fold(String::new(), |mut output, (i, v)| {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe an imperative approach is clearer here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@nyurik nyurik force-pushed the fmt-gen branch 3 times, most recently from 5f480fd to 1bf457a Compare December 1, 2024 05:15
@pvdrz pvdrz added this pull request to the merge queue Dec 1, 2024
Merged via the queue into rust-lang:main with commit d9576ea Dec 1, 2024
28 checks passed
@nyurik nyurik deleted the fmt-gen branch December 1, 2024 20:05
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