lumol-org / lumol

Universal extensible molecular simulation engine
http://lumol.org/
BSD 3-Clause "New" or "Revised" License
190 stars 18 forks source link

Setup and run rustfmt #224

Closed Luthaf closed 6 years ago

Luthaf commented 6 years ago

This PR mainly setup and run rustfmt on the whole repo. Two other commits (2a6cb38 and 96d6e3a) do minor API changes that later improve the overall formatting.

I used to be pretty reluctant to use anything like a code formatter, but I recently changed my mind =). This will help when working with multiple people on the same codebase to maintain readability.

Future things we may want to do or not (what are your opinions on these?):

I am a bit hesitant to do this now, as rustfmt is not stable at all and requires a nightly compiler to install.

g-bauer commented 6 years ago

I am using rustfmt for quite a while and I like it - so I think it is a good idea to add it. I am not sure if I'd let the build fail if there are formatting issues though (at least for now) but if we decide to use it we should add it to Contributing.md.

Luthaf commented 6 years ago

Ok, I added a few words about rustfmt in Contributing.md =)

g-bauer commented 6 years ago

Can I merge?

Luthaf commented 6 years ago

Yes, go for it!

If the PR is not marked as 'WIP', you are the one deciding to merge it =)