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