Merge pull request #2100 from topecongiro/issue-2098
Remove redundant shrink_left
This commit is contained in:
commit
48fb1139ea
@ -1235,13 +1235,13 @@ fn format_tuple_struct(
|
||||
}
|
||||
result.push(')');
|
||||
} else {
|
||||
// 3 = `();`
|
||||
// 1 = ","
|
||||
let body = rewrite_call_inner(
|
||||
context,
|
||||
"",
|
||||
&fields.iter().map(|field| field).collect::<Vec<_>>()[..],
|
||||
span,
|
||||
Shape::legacy(context.budget(last_line_width(&result) + 3), offset),
|
||||
Shape::indented(offset, context.config).sub_width(1)?,
|
||||
context.config.fn_call_width(),
|
||||
false,
|
||||
)?;
|
||||
|
@ -67,9 +67,8 @@ pub fn rewrite_path(
|
||||
result.push_str("::");
|
||||
}
|
||||
|
||||
let extra_offset = extra_offset(&result, shape);
|
||||
// 3 = ">::".len()
|
||||
let shape = shape.shrink_left(extra_offset)?.sub_width(3)?;
|
||||
let shape = shape.sub_width(3)?;
|
||||
|
||||
result = rewrite_path_segments(
|
||||
PathContext::Type,
|
||||
|
@ -141,3 +141,8 @@ pub enum Entry<'a, K: 'a, V: 'a> {
|
||||
pub enum ForegroundColor {
|
||||
CYAN = (winapi::FOREGROUND_INTENSITY | winapi::FOREGROUND_GREEN | winapi::FOREGROUND_BLUE) as u16,
|
||||
}
|
||||
|
||||
// #2098
|
||||
pub enum E<'a> {
|
||||
V ( < std::slice::Iter<'a, Xxxxxxxxxxxxxx> as Iterator> :: Item ) ,
|
||||
}
|
||||
|
@ -179,3 +179,8 @@ pub enum ForegroundColor {
|
||||
CYAN =
|
||||
(winapi::FOREGROUND_INTENSITY | winapi::FOREGROUND_GREEN | winapi::FOREGROUND_BLUE) as u16,
|
||||
}
|
||||
|
||||
// #2098
|
||||
pub enum E<'a> {
|
||||
V(<std::slice::Iter<'a, Xxxxxxxxxxxxxx> as Iterator>::Item),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user