blob: 7b3b53017cd6421e5f3998a15165b3a09d985a4f [file]
# This file defines the Rust style for automatic reformatting.
# See also https://rust-lang.github.io/rustfmt
# Rust language edition to be used by the parser.
edition = "2024"
# Version of the formatting rules to use.
style_edition = "2021"
# Line endings will be converted to \n.
newline_style = "Unix"
wrap_comments = true
# The "Default" setting has a heuristic which splits lines too aggresively.
# We are willing to revisit this setting in future versions of rustfmt.
# Bugs:
# * https://github.com/rust-lang/rustfmt/issues/3119
# * https://github.com/rust-lang/rustfmt/issues/3120
use_small_heuristics = "Max"
# Third party code is formatted upstream.
# Please use negative pattern (!path) for any path you do want to format.
ignore = [
# Ignore third-party code - e.g. `third_party/cloud_authenticator`.
"third_party/**",
# Un-ignore Rust sources in Blink.
"!third_party/blink/**",
# Un-ignore "wrappers" of crates.io libraries - e.g.
# `third_party/rust/serde_json_lenient/v0_2/wrapper/lib.rs`
"!third_party/rust/**",
# Explicitly ignore third-party code vendored from crates.io.
# (This entry "wins" over the `!third_party/rust/**` one because it is last.)
"third_party/rust/chromium_crates_io/vendor/**",
]