Merge pull request #1879 from topecongiro/issue-1878

Use correct width for subexpr_list
This commit is contained in:
Nick Cameron 2017-08-14 11:10:28 +12:00 committed by GitHub
commit 16920fb5c5
3 changed files with 10 additions and 0 deletions

View file

@ -233,6 +233,7 @@ pub fn rewrite_chain(expr: &ast::Expr, context: &RewriteContext, shape: Shape) -
connector.as_str()
};
let subexpr_num = subexpr_list.len();
let result = if is_small_parent && rewrites.len() > 1 {
let second_connector = choose_first_connector(
context,

View file

@ -282,3 +282,7 @@ fn issue_1862() {
/* com */ this_last_arg_is_tooooooooooooooooooooooooooooooooo_long_to_be_kept_with_the_pre_comment ,
)
}
fn issue_1878() {
let channel: &str = seq.next_element()?.ok_or_else(|| de::Error::invalid_length(2, &self))?;
}

View file

@ -333,3 +333,8 @@ fn issue_1862() {
this_last_arg_is_tooooooooooooooooooooooooooooooooo_long_to_be_kept_with_the_pre_comment,
)
}
fn issue_1878() {
let channel: &str = seq.next_element()?
.ok_or_else(|| de::Error::invalid_length(2, &self))?;
}