google / cro3

Abstraction Layer of ChromiumOS development
https://google.github.io/cro3/
BSD 3-Clause "New" or "Revised" License
36 stars 12 forks source link

Create a rustfmt.toml and reformat #74

Open brandonpollack23 opened 1 year ago

brandonpollack23 commented 1 year ago

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

brandonpollack23 commented 1 year ago

PR #76