Avoid unnecessary pattern matching against Option and Result
This commit is contained in:
parent
11a902431b
commit
44d32d4413
16 changed files with 21 additions and 23 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue