@@ -239,17 +239,12 @@ fn rewrite_closure_fn_decl(
239
239
. sub_width ( 4 ) ?;
240
240
241
241
let indent_style = context. config . indent_style ( ) ;
242
- let version = context. config . version ( ) ;
243
242
244
243
// 1 = |
245
244
let param_offset = nested_shape. indent + 1 ;
246
245
let param_shape = match indent_style {
247
246
IndentStyle :: Block => {
248
- if version == Version :: Two {
249
- Shape :: indented ( shape. indent . block_indent ( context. config ) , context. config )
250
- } else {
251
- nested_shape. offset_left ( 1 ) ?. visual_indent ( 0 )
252
- }
247
+ Shape :: indented ( shape. indent . block_indent ( context. config ) , context. config )
253
248
}
254
249
IndentStyle :: Visual => nested_shape. offset_left ( 1 ) ?. visual_indent ( 0 ) ,
255
250
} ;
@@ -290,25 +285,24 @@ fn rewrite_closure_fn_decl(
290
285
IndentStyle :: Block => list_str. contains ( '\n' ) || list_str. len ( ) > one_line_budget,
291
286
_ => false ,
292
287
} ;
293
- let ( param_str, put_params_in_block) =
294
- if multi_line_params && !item_vec. is_empty ( ) && version == Version :: Two {
295
- let trailing_comma = match context. config . trailing_comma ( ) {
296
- SeparatorTactic :: Never => "" ,
297
- _ => "," ,
298
- } ;
299
- (
300
- format ! (
301
- "{}{}{}{}" ,
302
- param_shape. indent. to_string_with_newline( context. config) ,
303
- & list_str,
304
- trailing_comma,
305
- shape. indent. to_string_with_newline( context. config)
306
- ) ,
307
- true ,
308
- )
309
- } else {
310
- ( list_str, false )
288
+ let ( param_str, put_params_in_block) = if multi_line_params && !item_vec. is_empty ( ) {
289
+ let trailing_comma = match context. config . trailing_comma ( ) {
290
+ SeparatorTactic :: Never => "" ,
291
+ _ => "," ,
311
292
} ;
293
+ (
294
+ format ! (
295
+ "{}{}{}{}" ,
296
+ param_shape. indent. to_string_with_newline( context. config) ,
297
+ & list_str,
298
+ trailing_comma,
299
+ shape. indent. to_string_with_newline( context. config)
300
+ ) ,
301
+ true ,
302
+ )
303
+ } else {
304
+ ( list_str, false )
305
+ } ;
312
306
let mut prefix = format ! ( "{}{}{}|{}|" , is_async, immovable, mover, param_str) ;
313
307
314
308
if !ret_str. is_empty ( ) {
0 commit comments