From b857a5dcf094728b4beefd652ea31d2828eb0e10 Mon Sep 17 00:00:00 2001 From: Maan2003 Date: Sun, 13 Jun 2021 09:37:28 +0530 Subject: clippy::manual_str_repeat --- crates/syntax/src/ast/edit.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/syntax') diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs index 8698687d8..2663c0759 100644 --- a/crates/syntax/src/ast/edit.rs +++ b/crates/syntax/src/ast/edit.rs @@ -95,7 +95,7 @@ impl fmt::Display for IndentLevel { let indent = if len <= spaces.len() { &spaces[..len] } else { - buf = iter::repeat(' ').take(len).collect::(); + buf = " ".repeat(len); &buf }; fmt::Display::fmt(indent, f) -- cgit v1.2.3