Merge pull request #3306 from topecongiro/issue-2841
Do not force trailing comma when using mixed layout
This commit is contained in:
commit
7c0f59bee3
4 changed files with 10 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue