RPG-Alex / project-julia

A Web Assembly Adaptation of a procedurally generated image based on Julia Sets
2 stars 1 forks source link

Formatting code #10

Closed Silzinc closed 8 months ago

Silzinc commented 8 months ago

It would be nice to have a rustfmt.toml file so that the formatting style is uniform. I use a personal custom config with the nightly toolchain like below:

brace_style = "AlwaysNextLine"
fn_single_line = true
format_strings = true
tab_spaces = 2
wrap_comments = true
format_code_in_doc_comments = true
match_arm_blocks = false
match_arm_leading_pipes = "Preserve"
match_block_trailing_comma = true
reorder_impl_items = true
imports_granularity = "Crate"
struct_field_align_threshold = 20
enum_discrim_align_threshold = 20
fn_call_width = 80
use_field_init_shorthand = true

It's very specific, and I don't want to leave formats others do not want on my commits :/ (I usually format on save)