Skip to content

Commit 005e356

Browse files
authored
use push() instead of push_str() for single char (#394)
This solves a clippy warning
1 parent 6358ee8 commit 005e356

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/delta.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ fn handle_hunk_line(
561561
painter
562562
.output_buffer
563563
.push_str(&painter.expand_tabs(raw_line.graphemes(true)));
564-
painter.output_buffer.push_str("\n");
564+
painter.output_buffer.push('\n');
565565
State::HunkZero
566566
}
567567
}

src/features/side_by_side.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub fn paint_minus_and_plus_lines_side_by_side<'a>(
107107
background_color_extends_to_terminal_width,
108108
config,
109109
));
110-
output_buffer.push_str("\n");
110+
output_buffer.push('\n');
111111
}
112112
}
113113

@@ -171,7 +171,7 @@ pub fn paint_zero_lines_side_by_side(
171171
config,
172172
);
173173
output_buffer.push_str(&right_panel_line);
174-
output_buffer.push_str("\n");
174+
output_buffer.push('\n');
175175
}
176176
}
177177

src/paint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ impl<'a> Painter<'a> {
292292
}
293293
};
294294
output_buffer.push_str(&line);
295-
output_buffer.push_str("\n");
295+
output_buffer.push('\n');
296296
}
297297
}
298298

0 commit comments

Comments
 (0)