aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_fmt
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-13 10:32:45 +0100
committerAleksey Kladov <[email protected]>2020-08-13 10:37:54 +0100
commitb0f03db51dc84aac56c807ecf4da8151c01e3c04 (patch)
treeaa14955e0ea4838e6def7a953e90c2348c1a7c4a /crates/ra_fmt
parent26b98b07aa0e4430bc872b28eadbc822cfee7b6e (diff)
Remove deprecated function
Diffstat (limited to 'crates/ra_fmt')
-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()?) {