Skip to content

Use prettyplease to improve formatting of generated Rust code#2949

Merged
emilk merged 3 commits into
mainfrom
emilk/prettyplease
Aug 9, 2023
Merged

Use prettyplease to improve formatting of generated Rust code#2949
emilk merged 3 commits into
mainfrom
emilk/prettyplease

Conversation

@emilk
Copy link
Copy Markdown
Member

@emilk emilk commented Aug 9, 2023

What

Use prettyplease to format our generated Rust code, before also running cargo fmt on it. Yes, we need both.

Example of the resulting improvement:

image

Checklist

@emilk emilk added 🧑‍💻 dev experience developer experience (excluding CI) codegen/idl labels Aug 9, 2023
Copy link
Copy Markdown
Contributor

@jleibs jleibs left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@emilk emilk merged commit 481e852 into main Aug 9, 2023
@emilk emilk deleted the emilk/prettyplease branch August 9, 2023 21:14
ntjohnson1 added a commit that referenced this pull request Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codegen/idl 🧑‍💻 dev experience developer experience (excluding CI)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use prettyplease instead of rustfmt for generated code

2 participants