1
Fork 0

Use str::repeat

This commit is contained in:
Shotaro Yamada 2018-04-01 13:48:15 +09:00
parent 3d0e93309d
commit 3525368a56
10 changed files with 24 additions and 41 deletions

View file

@ -901,9 +901,7 @@ impl EmitterWriter {
// | | length of label
// | magic `3`
// `max_line_num_len`
let padding = (0..padding + label.len() + 5)
.map(|_| " ")
.collect::<String>();
let padding = " ".repeat(padding + label.len() + 5);
/// Return whether `style`, or the override if present and the style is `NoStyle`.
fn style_or_override(style: Style, override_style: Option<Style>) -> Style {