1
Fork 0

Avoid unnecessary pattern matching against Option and Result

This commit is contained in:
ljedrz 2018-07-27 13:20:13 +02:00
parent 11a902431b
commit 44d32d4413
16 changed files with 21 additions and 23 deletions

View file

@ -1295,7 +1295,7 @@ impl EmitterWriter {
}
// if we elided some lines, add an ellipsis
if let Some(_) = lines.next() {
if lines.next().is_some() {
buffer.puts(row_num, max_line_num_len - 1, "...", Style::LineNumber);
} else if !show_underline {
draw_col_separator_no_space(&mut buffer, row_num, max_line_num_len + 1);