Hoverbear / old-raft-rs

[Incomplete] A Raft implementation in Rust
https://hoverbear.github.io/raft-rs/raft/
MIT License
266 stars 41 forks source link

Rustfmt #108

Closed posix4e closed 8 years ago

posix4e commented 9 years ago

If we want to keep everything in line with rustfmt, this would be a way to do it.

posix4e commented 9 years ago

Also this patch is trivial for me to rebase so feel free to merge others and I will be glad to up-to-date-the-patch

tbg commented 9 years ago

:+1:, though I don't see the value in having a commit for each individual file changed. As far as I'm concerned, it would make sense to squash them.

posix4e commented 9 years ago

I just combined all the commits. Anything else we want to see?

posix4e commented 9 years ago

Dan pointed out examples should be formatted as well. I made that change

posix4e commented 9 years ago

I plopped a patch on rustfmt to not try to align strings which the user already has newlines https://github.com/nrc/rustfmt/pull/235. I reformatted it using the version in that pull request. It may require that I go about it another way before it gets merged. Now the examples format correctly as well.

posix4e commented 9 years ago

Upon looking into this futher I think we need a bunch of improvements to rustfmt before we can take it as gospel. I'll close this for now

Hoverbear commented 9 years ago

@posix4e Let's leave this open, actually! I'd like to ~one day~ do it.

posix4e commented 9 years ago

Actually It seems as though I was able to get rid of the trailing commas and prevent the examples from getting mangled. I turned on reordering of imports. I think it reads much easier that way, but it'll create a lot of churn. The main thing that worried me was the panicing.

homu commented 8 years ago

:umbrella: The latest upstream changes (presumably #111) made this pull request unmergeable. Please resolve the merge conflicts.

Hoverbear commented 8 years ago

There has been many updates to rustfmt and it might be good to take a new look at this!

tbg commented 8 years ago

+1

Hoverbear commented 8 years ago

You can now run cargo format with Rustfmt!