From 3525368a562435622c3c8f293354805e6961b0bf Mon Sep 17 00:00:00 2001 From: Shotaro Yamada Date: Sun, 1 Apr 2018 13:48:15 +0900 Subject: Use str::repeat --- src/librustc_errors/emitter.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/librustc_errors') diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index 6bcf0d9eff6..a392278cab9 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -901,9 +901,7 @@ impl EmitterWriter { // | | length of label // | magic `3` // `max_line_num_len` - let padding = (0..padding + label.len() + 5) - .map(|_| " ") - .collect::(); + 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