File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -132,11 +132,14 @@ impl<'a> FmtVisitor<'a> {
132
132
debug ! ( "rewrite_paren, subexpr_str: `{}`" , subexpr_str) ;
133
133
let mut lines = subexpr_str. rsplit ( '\n' ) ;
134
134
let last_line_len = lines. next ( ) . unwrap ( ) . len ( ) ;
135
- let last_line_offset = if lines. next ( ) . is_none ( ) { offset+1 } else { 0 } ;
135
+ let last_line_offset = match lines. next ( ) {
136
+ None => offset+1 ,
137
+ Some ( _) => 0 ,
138
+ } ;
136
139
if width + offset - last_line_offset - last_line_len > 0 {
137
140
format ! ( "({})" , subexpr_str)
138
141
} else {
139
- // FIXME That's correct unless we have width < 2. Return an Optrion for such cases ?
142
+ // FIXME That's correct unless we have width < 2. Return an Option for such cases ?
140
143
format ! ( "({}\n {} )" , subexpr_str, make_indent( offset) )
141
144
}
142
145
}
You can’t perform that action at this time.
0 commit comments