File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -169,10 +169,8 @@ impl Margin {
169
169
fn right ( & self , line_len : usize ) -> usize {
170
170
if line_len. saturating_sub ( self . computed_left ) <= self . column_width {
171
171
line_len
172
- } else if self . computed_right > line_len {
173
- line_len
174
172
} else {
175
- self . computed_right
173
+ min ( line_len , self . computed_right )
176
174
}
177
175
}
178
176
}
@@ -797,9 +795,7 @@ impl EmitterWriter {
797
795
}
798
796
}
799
797
}
800
- if line_len < p {
801
- line_len = p;
802
- }
798
+ line_len = max ( line_len, p) ;
803
799
}
804
800
805
801
if line_len != 0 {
@@ -1772,9 +1768,7 @@ impl FileWithAnnotatedLines {
1772
1768
1773
1769
let mut max_depth = 0 ; // max overlapping multiline spans
1774
1770
for ( file, ann) in multiline_annotations {
1775
- if ann. depth > max_depth {
1776
- max_depth = ann. depth ;
1777
- }
1771
+ max_depth = max ( max_depth, ann. depth ) ;
1778
1772
let mut end_ann = ann. as_end ( ) ;
1779
1773
if !ann. overlaps_exactly {
1780
1774
// avoid output like
You can’t perform that action at this time.
0 commit comments