Skip to content

Commit

Permalink
Use prettyplease to improve formatting of generated Rust code (#2949)
Browse files Browse the repository at this point in the history
* Closes #2947

### What
Use [`prettyplease`](https://github.com/dtolnay/prettyplease ) to format
our generated Rust code, before also running `cargo fmt` on it. Yes, we
need both.

Example of the resulting improvement:


![image](https://github.com/rerun-io/rerun/assets/1148717/77b24ed7-8ac5-4e35-9918-c8cb7aa1c49a)


### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2949) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2949)
- [Docs
preview](https://rerun.io/preview/pr%3Aemilk%2Fprettyplease/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Aemilk%2Fprettyplease/examples)
  • Loading branch information
emilk authored Aug 9, 2023
1 parent b975407 commit 481e852
Show file tree
Hide file tree
Showing 50 changed files with 2,011 additions and 772 deletions.
63 changes: 37 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/re_types/source_hash.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/re_types/src/archetypes/annotation_context.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/re_types/src/archetypes/arrows3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/re_types/src/archetypes/disconnected_space.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/re_types/src/archetypes/line_strips2d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/re_types/src/archetypes/line_strips3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/re_types/src/archetypes/points2d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/re_types/src/archetypes/points3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/re_types/src/archetypes/transform3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 481e852

Please sign in to comment.