Closed svanharmelen closed 3 years ago
Can you send me a merge with just the rustfmt changed? I'll incorporate that, although traditionally I've used the built-in formatter in IntelliJ so I need to see what impact it has on auto-generated code before I apply it to the rest of the source.
If you really want I will remove the second commit... But to be honest it doesn't do anything else then formatting and cleaning up the imports. There were some strange (unneeded) imports like use tokio::{self}
or use std::{self, ...}
. And there were a couple of places were primitives like u32
or u64
were specifically imported, while in other places they were not (which makes sense as they are already available through the std::prelude
).
So sure you want me to delete that second commit?
As for Intelij, I use that as well (CLion). In one of the latest plugin updates they added this one:
So that makes it easy to follow the community styling ๐
Thanks for the quick reaction by the way! These types of PR's are usually nasty to keep in sync, so thanks for not letting that happen!
u32 and u64 were imported for some min/max stuff which at the time required the import and maybe don't now. What I'll do today is bring the rustfmt in from your req and run it locally and hopefully that will reduce this request to zero
I have done the following in master and will close this request:
Concerning rustfmt I'm not sure I like the default formatting rules for a few things, especially the way an else doesn't start on a new line but appears as "} else {" for the time being I'll leave it this way.
Super nice! Thanks @locka99 ๐๐ป
As for the defaults, you can of course always tweak the rustfmt.toml
config to your preferences. Since the rustfmt.toml
file is now in this repo, it will be used automatically by most (if not all) editors out there. So it will be much easier to keep the formatting consistent. Thanks again for doing this!
This is a potential solution for issue #74, so trying to make all the code formatting consistent. Really hope this format (the default) works for you, but if not then please let me know what you would like to have changed. Thanks!