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

Update documentation for Rust #40

Merged
merged 2 commits into from
Dec 16, 2023
Merged

Update documentation for Rust #40

merged 2 commits into from
Dec 16, 2023

Conversation

sonnyp
Copy link
Contributor

@sonnyp sonnyp commented Dec 16, 2023

No description provided.

Copy link
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

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

One small comment, apart from that it looks good!

charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
Copy link
Contributor

Choose a reason for hiding this comment

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

We for sure want intend size of 4 for Rust files.

Isn't that the case for most files? I mostly see 2 for xml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just copied over what we have for Workbench.

Only our Python files uses an indent size of 4 ATM

Copy link
Contributor

Choose a reason for hiding this comment

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

I assume because noone tried it with Rust yet :)

Rustfmt enforces 4 spaces

Copy link
Contributor Author

Choose a reason for hiding this comment

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

crazy idea, maybe we move everything to tabs

Copy link
Contributor

Choose a reason for hiding this comment

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

Honestly, I have no stakes in this game. But as far as can see, the tab vs spaces dispute is over, and spaces clearly won. At least for Rust, using anything else than rustfmt defaults would just needlessly confuse people. To a slightly lesser degree, the same is true for Python and black. In both cases the answer is indentation of 4 spaces.

Copy link
Contributor Author

@sonnyp sonnyp Dec 16, 2023

Choose a reason for hiding this comment

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

Hmm I checked too fast. Our rust files have 4 spaces, not 2. I thought something wasn't what you thought it was.
But all our .rs files is 4 spaces indentation indeed.

I agree whatever the standard formatter does is fine.

I'll update the editorconfig of both Workbench and demos

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks

@sonnyp sonnyp merged commit b787136 into main Dec 16, 2023
1 check passed
@sonnyp sonnyp deleted the update-doc-for-rust branch December 16, 2023 18:21
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