Skip to content
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

Improve debug str generator #3010

Merged
merged 1 commit into from
Dec 1, 2024
Merged

Improve debug str generator #3010

merged 1 commit into from
Dec 1, 2024

Conversation

nyurik
Copy link
Contributor

@nyurik nyurik commented Nov 30, 2024

@@ -194,8 +194,14 @@ impl<'a> ImplDebug<'a> for Item {
self.#name_ident
.iter()
.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