mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 04:34:51 +00:00
fix : width available
This commit is contained in:
parent
092d6be368
commit
38f421b764
@ -204,8 +204,9 @@ impl<'a> FmtVisitor<'a> {
|
||||
.enumerate()
|
||||
.map(|(i, item)| self.rewrite_expr(
|
||||
item,
|
||||
// for last line, -2 is for indent + ")", for other lines, -1 is for comma
|
||||
if i == items.len() - 1 { width - 2 } else { config!(max_width) - indent - 1 },
|
||||
// last line : given width (minus "("+")"), other lines : max_width
|
||||
// (minus "("+","))
|
||||
if i == items.len() - 1 { width - 2 } else { config!(max_width) - indent - 2 },
|
||||
indent))
|
||||
.collect();
|
||||
let tactics = if item_strs.iter().any(|s| s.contains('\n')) {
|
||||
|
@ -2,8 +2,9 @@
|
||||
|
||||
fn foo() {
|
||||
let a = (a, a, a, a, a);
|
||||
let aaaaaaaaaaaaaaaa = (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaa, aaaaaaaaaa);
|
||||
let aaaaaaaaaaaaaaaa = (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaa, aaaaaaaaaaaaaa);
|
||||
let aaaaaaaaaaaaaaaaaaaaaa = (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaa,
|
||||
aaaa);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user