Use correct fn args indent for Visual

This commit is contained in:
Ivan Molodetskikh 2018-08-31 16:53:18 +03:00
parent 05b6aaa130
commit 54f8bcb5a2
No known key found for this signature in database
GPG Key ID: 02CE38DA47E9D691

View File

@ -732,7 +732,11 @@ fn rewrite_bare_fn(
result.push_str("fn");
let func_ty_shape = shape.offset_left(result.len())?;
let func_ty_shape = if context.use_block_indent() {
shape.offset_left(result.len())?
} else {
shape.visual_indent(result.len()).sub_width(result.len())?
};
let rewrite = format_function_type(
bare_fn.decl.inputs.iter(),