use push() instead of push_str() for single char (#394)

This solves a clippy warning
This commit is contained in:
Marco Ieni 2020-11-22 17:21:30 +01:00 committed by GitHub
parent 6358ee8592
commit 005e3568b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -561,7 +561,7 @@ fn handle_hunk_line(
painter
.output_buffer
.push_str(&painter.expand_tabs(raw_line.graphemes(true)));
painter.output_buffer.push_str("\n");
painter.output_buffer.push('\n');
State::HunkZero
}
}

View File

@ -107,7 +107,7 @@ pub fn paint_minus_and_plus_lines_side_by_side<'a>(
background_color_extends_to_terminal_width,
config,
));
output_buffer.push_str("\n");
output_buffer.push('\n');
}
}
@ -171,7 +171,7 @@ pub fn paint_zero_lines_side_by_side(
config,
);
output_buffer.push_str(&right_panel_line);
output_buffer.push_str("\n");
output_buffer.push('\n');
}
}

View File

@ -292,7 +292,7 @@ impl<'a> Painter<'a> {
}
};
output_buffer.push_str(&line);
output_buffer.push_str("\n");
output_buffer.push('\n');
}
}