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/tt/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/tt/src') diff --git a/crates/tt/src/lib.rs b/crates/tt/src/lib.rs index bed44d600..b51ad5d0f 100644 --- a/crates/tt/src/lib.rs +++ b/crates/tt/src/lib.rs @@ -88,7 +88,7 @@ pub struct Ident { } fn print_debug_subtree(f: &mut fmt::Formatter<'_>, subtree: &Subtree, level: usize) -> fmt::Result { - let align = std::iter::repeat(" ").take(level).collect::(); + let align = " ".repeat(level); let aux = match subtree.delimiter.map(|it| (it.kind, it.id.0)) { None => "$".to_string(), @@ -113,7 +113,7 @@ fn print_debug_subtree(f: &mut fmt::Formatter<'_>, subtree: &Subtree, level: usi } fn print_debug_token(f: &mut fmt::Formatter<'_>, tkn: &TokenTree, level: usize) -> fmt::Result { - let align = std::iter::repeat(" ").take(level).collect::(); + let align = " ".repeat(level); match tkn { TokenTree::Leaf(leaf) => match leaf { -- cgit v1.2.3