@@ -316,6 +316,9 @@ pub struct WidthHeuristics {
316316 // Maximum width of the args of a function call before falling back
317317 // to vertical formatting.
318318 pub fn_call_width : usize ,
319+ // Maximum width of the args of a function-like attributes before falling
320+ // back to vertical formatting.
321+ pub attr_fn_like_width : usize ,
319322 // Maximum width in the body of a struct lit before falling back to
320323 // vertical formatting.
321324 pub struct_lit_width : usize ,
@@ -337,6 +340,7 @@ impl WidthHeuristics {
337340 pub fn null ( ) -> WidthHeuristics {
338341 WidthHeuristics {
339342 fn_call_width : usize:: max_value ( ) ,
343+ attr_fn_like_width : usize:: max_value ( ) ,
340344 struct_lit_width : 0 ,
341345 struct_variant_width : 0 ,
342346 array_width : usize:: max_value ( ) ,
@@ -348,6 +352,7 @@ impl WidthHeuristics {
348352 pub fn set ( max_width : usize ) -> WidthHeuristics {
349353 WidthHeuristics {
350354 fn_call_width : max_width,
355+ attr_fn_like_width : max_width,
351356 struct_lit_width : max_width,
352357 struct_variant_width : max_width,
353358 array_width : max_width,
@@ -368,6 +373,7 @@ impl WidthHeuristics {
368373 } ;
369374 WidthHeuristics {
370375 fn_call_width : ( 60.0 * max_width_ratio) . round ( ) as usize ,
376+ attr_fn_like_width : ( 70.0 * max_width_ratio) . round ( ) as usize ,
371377 struct_lit_width : ( 18.0 * max_width_ratio) . round ( ) as usize ,
372378 struct_variant_width : ( 35.0 * max_width_ratio) . round ( ) as usize ,
373379 array_width : ( 60.0 * max_width_ratio) . round ( ) as usize ,
0 commit comments