use config::lists::*;
use syntax::ast;
-use syntax::codemap::Span;
use syntax::parse::token::DelimToken;
+use syntax::source_map::Span;
use closures;
-use codemap::SpanUtils;
use expr::{is_every_expr_simple, is_method_call, is_nested_call, maybe_get_args_offset, ToExpr};
use lists::{definitive_tactic, itemize_list, write_list, ListFormatting, ListItem, Separator};
use rewrite::{Rewrite, RewriteContext};
use shape::Shape;
+use source_map::SpanUtils;
use spanned::Spanned;
use utils::{count_newlines, extra_offset, first_line_width, last_line_width, mk_sp};
// 1 = "("
let combine_arg_with_callee = self.items.len() == 1
&& self.items[0].to_expr().is_some()
- && self.ident.len() + 1 <= self.context.config.tab_spaces();
+ && self.ident.len() < self.context.config.tab_spaces();
let overflow_last = combine_arg_with_callee || can_be_overflowed(self.context, self.items);
// Replace the last item with its first line to see if it fits with
(true, DefinitiveListTactic::Horizontal, placeholder @ Some(..)) => {
list_items[self.items.len() - 1].item = placeholder;
}
- _ if self.items.len() >= 1 => {
+ _ if !self.items.is_empty() => {
list_items[self.items.len() - 1].item = self
.items
.last()