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 {
169169 fn right ( & self , line_len : usize ) -> usize {
170170 if line_len. saturating_sub ( self . computed_left ) <= self . column_width {
171171 line_len
172- } else if self . computed_right > line_len {
173- line_len
174172 } else {
175- self . computed_right
173+ min ( line_len , self . computed_right )
176174 }
177175 }
178176}
@@ -797,9 +795,7 @@ impl EmitterWriter {
797795 }
798796 }
799797 }
800- if line_len < p {
801- line_len = p;
802- }
798+ line_len = max ( line_len, p) ;
803799 }
804800
805801 if line_len != 0 {
@@ -1772,9 +1768,7 @@ impl FileWithAnnotatedLines {
17721768
17731769 let mut max_depth = 0 ; // max overlapping multiline spans
17741770 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 ) ;
17781772 let mut end_ann = ann. as_end ( ) ;
17791773 if !ann. overlaps_exactly {
17801774 // avoid output like
You can’t perform that action at this time.
0 commit comments