headless-studio / leptos-leaflet

MIT License
22 stars 14 forks source link

Adding rustfmt.toml #11

Closed emirror-de closed 7 months ago

emirror-de commented 7 months ago

To get the same code formatting for every developer, would you be interested in adding a rustfmt.toml to this project?

For example:

max_width = 80
format_strings = false
imports_layout = "HorizontalVertical"
imports_granularity="One"
reorder_imports = true
dgsantana commented 7 months ago

Why not use the defaults provided by cargo fmt? I'm not opposed to this, but I rarely needed to change the defaults.

emirror-de commented 7 months ago

Thats a justified question. For me, it is easier to read when for example the use statements are combined. But I am also happy to stick with the defaults as well. I also just noticed that the example I posted contains deprecated values.

dgsantana commented 7 months ago

I would stick with the defaults for now. Maybe we can revisit this when edition 2024 of Rust comes out. But thanks again for the suggestion.