Do not force trailing comma when using mixed layout

This commit is contained in:
topecongiro 2019-01-31 23:44:58 +09:00
parent 923da60f72
commit 154ccf6a02
4 changed files with 10 additions and 3 deletions

2
Cargo.lock generated
View File

@ -1,3 +1,5 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "aho-corasick"
version = "0.6.9"

View File

@ -607,9 +607,6 @@ impl<'a> Context<'a> {
tactic
} else if !self.context.use_block_indent() {
SeparatorTactic::Never
} else if tactic == DefinitiveListTactic::Mixed {
// We are using mixed layout because everything did not fit within a single line.
SeparatorTactic::Always
} else {
self.context.config.trailing_comma()
};

View File

@ -39,3 +39,7 @@ enum StructY {
i: i32,
}
}
static XXX: [i8; 64] = [
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1, 1, 1,
];

View File

@ -29,3 +29,7 @@ enum StructY {
A { s: u16 },
B { u: u32, i: i32 }
}
static XXX: [i8; 64] = [
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
];