Add a rustfmt.toml file with some clean guidlines. #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: Though seemingly large this change is a total no-op and run with
cargo fmt
only, just he simplest thing I could think of for a first issue.This is based on my own rustfmt.toml I usually use. I tend to set these for the following reasons:
imports_granularity = "Crate" # this combines a bunch of lines at the top, but it doesnt match google style so I removed it tab_spaces = 2 # param lists and chained calls tend to be longer and more common in rust, I think this increases readability fn_params_layout = "Tall" # this is way easier to read than non tall format_strings = true
use_try_shorthand = true # replace any ugly try! macros with the pretty ? wrap_comments = true
max_width = 100 # If we can do it in Java, we can do it in Rust
for issue #74