aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_fmt/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_fmt/src')
-rw-r--r--crates/ra_fmt/src/lib.rs5
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
13pub 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.
19pub fn leading_indent(node: &SyntaxNode) -> Option<SmolStr> { 14pub 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()?) {