File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -1908,12 +1908,16 @@ where
1908
1908
1
1909
1909
} ;
1910
1910
let used_width = extra_offset ( callee_str, shape) ;
1911
- let one_line_width = shape. width . checked_sub ( used_width + 2 * paren_overhead) ?;
1911
+ let one_line_width = shape
1912
+ . width
1913
+ . checked_sub ( used_width + 2 * paren_overhead)
1914
+ . unwrap_or ( 0 ) ;
1912
1915
1913
1916
// 1 = "(" or ")"
1914
1917
let one_line_shape = shape
1915
- . offset_left ( last_line_width ( callee_str) + 1 ) ?
1916
- . sub_width ( 1 ) ?;
1918
+ . offset_left ( last_line_width ( callee_str) + 1 )
1919
+ . and_then ( |shape| shape. sub_width ( 1 ) )
1920
+ . unwrap_or ( Shape { width : 0 , ..shape } ) ;
1917
1921
let nested_shape = shape_from_indent_style (
1918
1922
context,
1919
1923
shape,
@@ -1950,7 +1954,13 @@ where
1950
1954
) ;
1951
1955
}
1952
1956
1953
- let args_shape = shape. sub_width ( last_line_width ( callee_str) ) ?;
1957
+ let args_shape = Shape {
1958
+ width : shape
1959
+ . width
1960
+ . checked_sub ( last_line_width ( callee_str) )
1961
+ . unwrap_or ( 0 ) ,
1962
+ ..shape
1963
+ } ;
1954
1964
Some ( format ! (
1955
1965
"{}{}" ,
1956
1966
callee_str,
You can’t perform that action at this time.
0 commit comments