-
Notifications
You must be signed in to change notification settings - Fork 16
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
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
No description provided.