We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40e6c26 commit 2bf4747Copy full SHA for 2bf4747
src/expr.rs
@@ -585,8 +585,6 @@ fn rewrite_closure_fn_decl(
585
};
586
let list_str = write_list(&item_vec, &fmt)?;
587
let mut prefix = format!("{}|{}|", mover, list_str);
588
- // 1 = space between `|...|` and body.
589
- let extra_offset = extra_offset(&prefix, shape) + 1;
590
591
if !ret_str.is_empty() {
592
if prefix.contains('\n') {
@@ -597,6 +595,8 @@ fn rewrite_closure_fn_decl(
597
595
}
598
596
prefix.push_str(&ret_str);
599
+ // 1 = space between `|...|` and body.
+ let extra_offset = last_line_width(&prefix) + 1;
600
601
Some((prefix, extra_offset))
602
0 commit comments