From 08ac56a6bbf6d6e52e5ed99215b40b6ad90df493 Mon Sep 17 00:00:00 2001 From: Reisen Date: Fri, 30 Apr 2021 03:09:55 +0000 Subject: [PATCH] Add some potentially sane rustfmt options. Change-Id: I76debba2f2caee5848f115064fd58e1d72b94308 --- solana/rustfmt.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/solana/rustfmt.toml b/solana/rustfmt.toml index c3c8c3753..acf722632 100644 --- a/solana/rustfmt.toml +++ b/solana/rustfmt.toml @@ -1 +1,11 @@ +# Merge similar crates together to avoid multiple use statements. imports_granularity = "Crate" + +# Consistency in formatting makes tool based searching/editing better. +empty_item_single_line = false + +# Easier editing when arbitrary mixed use statements do not collapse. +imports_layout = "HorizontalVertical" + +# Default rustfmt formatting of match arms with branches is awful. +match_arm_leading_pipes = "Preserve"