diff options
Diffstat (limited to 'crates/ra_fmt/src')
-rw-r--r-- | crates/ra_fmt/src/lib.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/crates/ra_fmt/src/lib.rs b/crates/ra_fmt/src/lib.rs index d0bf0593f..397a3c3ae 100644 --- a/crates/ra_fmt/src/lib.rs +++ b/crates/ra_fmt/src/lib.rs | |||
@@ -10,11 +10,6 @@ use syntax::{ | |||
10 | SyntaxNode, SyntaxToken, T, | 10 | SyntaxNode, SyntaxToken, T, |
11 | }; | 11 | }; |
12 | 12 | ||
13 | pub fn reindent(text: &str, indent: &str) -> String { | ||
14 | let indent = format!("\n{}", indent); | ||
15 | text.lines().intersperse(&indent).collect() | ||
16 | } | ||
17 | |||
18 | /// If the node is on the beginning of the line, calculate indent. | 13 | /// If the node is on the beginning of the line, calculate indent. |
19 | pub fn leading_indent(node: &SyntaxNode) -> Option<SmolStr> { | 14 | pub fn leading_indent(node: &SyntaxNode) -> Option<SmolStr> { |
20 | for token in prev_tokens(node.first_token()?) { | 15 | for token in prev_tokens(node.first_token()?) { |