1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-01 19:02:22 +01:00

Fix clippy warnings

This commit is contained in:
sharkdp
2018-05-31 15:27:55 +02:00
parent a7f4f202cb
commit e27bdfc7d6
2 changed files with 5 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ impl<'a> Printer<'a> {
// The grid border decoration isn't added until after the panel_width calculation, since the
// print_horizontal_line, print_header, and print_footer functions all assume the panel
// width is without the grid border.
if config.output_components.grid() && decorations.len() > 0 {
if config.output_components.grid() && !decorations.is_empty() {
decorations.push(Box::new(GridBorderDecoration::new(&colors)));
}
@@ -159,7 +159,7 @@ impl<'a> Printer<'a> {
for &(style, region) in regions.iter() {
let mut ansi_iterator = AnsiCodeIterator::new(region);
let mut ansi_prefix = "";
while let Some(chunk) = ansi_iterator.next() {
for chunk in ansi_iterator {
match chunk {
// ANSI escape passthrough.
(text, true) => {