File tree 4 files changed +12
-12
lines changed
4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -1049,10 +1049,10 @@ make_backup = false
1049
1049
max_width = 100
1050
1050
"# ;
1051
1051
let config = Config :: from_toml ( toml, Path :: new ( "./rustfmt.toml" ) ) . unwrap ( ) ;
1052
- assert_eq ! ( config. array_width( ) , usize :: max_value ( ) ) ;
1053
- assert_eq ! ( config. attr_fn_like_width( ) , usize :: max_value ( ) ) ;
1054
- assert_eq ! ( config. chain_width( ) , usize :: max_value ( ) ) ;
1055
- assert_eq ! ( config. fn_call_width( ) , usize :: max_value ( ) ) ;
1052
+ assert_eq ! ( config. array_width( ) , usize :: MAX ) ;
1053
+ assert_eq ! ( config. attr_fn_like_width( ) , usize :: MAX ) ;
1054
+ assert_eq ! ( config. chain_width( ) , usize :: MAX ) ;
1055
+ assert_eq ! ( config. fn_call_width( ) , usize :: MAX ) ;
1056
1056
assert_eq ! ( config. single_line_if_else_max_width( ) , 0 ) ;
1057
1057
assert_eq ! ( config. struct_lit_width( ) , 0 ) ;
1058
1058
assert_eq ! ( config. struct_variant_width( ) , 0 ) ;
Original file line number Diff line number Diff line change @@ -255,12 +255,12 @@ impl WidthHeuristics {
255
255
// Using this WidthHeuristics means we ignore heuristics.
256
256
pub fn null ( ) -> WidthHeuristics {
257
257
WidthHeuristics {
258
- fn_call_width : usize:: max_value ( ) ,
259
- attr_fn_like_width : usize:: max_value ( ) ,
258
+ fn_call_width : usize:: MAX ,
259
+ attr_fn_like_width : usize:: MAX ,
260
260
struct_lit_width : 0 ,
261
261
struct_variant_width : 0 ,
262
- array_width : usize:: max_value ( ) ,
263
- chain_width : usize:: max_value ( ) ,
262
+ array_width : usize:: MAX ,
263
+ chain_width : usize:: MAX ,
264
264
single_line_if_else_max_width : 0 ,
265
265
single_line_let_else_max_width : 0 ,
266
266
}
Original file line number Diff line number Diff line change @@ -1163,9 +1163,9 @@ pub(crate) fn convert_try_mac(
1163
1163
1164
1164
pub ( crate ) fn macro_style ( mac : & ast:: MacCall , context : & RewriteContext < ' _ > ) -> Delimiter {
1165
1165
let snippet = context. snippet ( mac. span ( ) ) ;
1166
- let paren_pos = snippet. find_uncommented ( "(" ) . unwrap_or ( usize:: max_value ( ) ) ;
1167
- let bracket_pos = snippet. find_uncommented ( "[" ) . unwrap_or ( usize:: max_value ( ) ) ;
1168
- let brace_pos = snippet. find_uncommented ( "{" ) . unwrap_or ( usize:: max_value ( ) ) ;
1166
+ let paren_pos = snippet. find_uncommented ( "(" ) . unwrap_or ( usize:: MAX ) ;
1167
+ let bracket_pos = snippet. find_uncommented ( "[" ) . unwrap_or ( usize:: MAX ) ;
1168
+ let brace_pos = snippet. find_uncommented ( "{" ) . unwrap_or ( usize:: MAX ) ;
1169
1169
1170
1170
if paren_pos < bracket_pos && paren_pos < brace_pos {
1171
1171
Delimiter :: Parenthesis
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ pub(crate) fn rewrite_string<'a>(
84
84
stripped_str
85
85
. len ( )
86
86
. checked_next_power_of_two ( )
87
- . unwrap_or ( usize:: max_value ( ) ) ,
87
+ . unwrap_or ( usize:: MAX ) ,
88
88
) ;
89
89
result. push_str ( fmt. opener ) ;
90
90
You can’t perform that action at this time.
0 commit comments