aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorMaan2003 <[email protected]>2021-06-13 05:07:28 +0100
committerMaan2003 <[email protected]>2021-06-13 05:07:28 +0100
commitb857a5dcf094728b4beefd652ea31d2828eb0e10 (patch)
treea6537335c95ef8bd740127b7136833650ddf8bad /crates
parentc50b4579ec842ac7c1f52e0e3c834d50fc9cd1bb (diff)
clippy::manual_str_repeat
Diffstat (limited to 'crates')
-rw-r--r--crates/syntax/src/ast/edit.rs2
-rw-r--r--crates/tt/src/lib.rs4
2 files changed, 3 insertions, 3 deletions
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 {
95 let indent = if len <= spaces.len() { 95 let indent = if len <= spaces.len() {
96 &spaces[..len] 96 &spaces[..len]
97 } else { 97 } else {
98 buf = iter::repeat(' ').take(len).collect::<String>(); 98 buf = " ".repeat(len);
99 &buf 99 &buf
100 }; 100 };
101 fmt::Display::fmt(indent, f) 101 fmt::Display::fmt(indent, f)
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 {
88} 88}
89 89
90fn print_debug_subtree(f: &mut fmt::Formatter<'_>, subtree: &Subtree, level: usize) -> fmt::Result { 90fn print_debug_subtree(f: &mut fmt::Formatter<'_>, subtree: &Subtree, level: usize) -> fmt::Result {
91 let align = std::iter::repeat(" ").take(level).collect::<String>(); 91 let align = " ".repeat(level);
92 92
93 let aux = match subtree.delimiter.map(|it| (it.kind, it.id.0)) { 93 let aux = match subtree.delimiter.map(|it| (it.kind, it.id.0)) {
94 None => "$".to_string(), 94 None => "$".to_string(),
@@ -113,7 +113,7 @@ fn print_debug_subtree(f: &mut fmt::Formatter<'_>, subtree: &Subtree, level: usi
113} 113}
114 114
115fn print_debug_token(f: &mut fmt::Formatter<'_>, tkn: &TokenTree, level: usize) -> fmt::Result { 115fn print_debug_token(f: &mut fmt::Formatter<'_>, tkn: &TokenTree, level: usize) -> fmt::Result {
116 let align = std::iter::repeat(" ").take(level).collect::<String>(); 116 let align = " ".repeat(level);
117 117
118 match tkn { 118 match tkn {
119 TokenTree::Leaf(leaf) => match leaf { 119 TokenTree::Leaf(leaf) => match leaf {