Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 54f8bcb

Browse files
committed
Use correct fn args indent for Visual
1 parent 05b6aaa commit 54f8bcb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/types.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,11 @@ fn rewrite_bare_fn(
732732

733733
result.push_str("fn");
734734

735-
let func_ty_shape = shape.offset_left(result.len())?;
735+
let func_ty_shape = if context.use_block_indent() {
736+
shape.offset_left(result.len())?
737+
} else {
738+
shape.visual_indent(result.len()).sub_width(result.len())?
739+
};
736740

737741
let rewrite = format_function_type(
738742
bare_fn.decl.inputs.iter(),

0 commit comments

Comments
 (0)