aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_fmt/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-13 10:38:26 +0100
committerGitHub <[email protected]>2020-08-13 10:38:26 +0100
commit45883921f93aa2a81ceb8d0e04744ff8d3371df1 (patch)
treeaa14955e0ea4838e6def7a953e90c2348c1a7c4a /crates/ra_fmt/src
parent8f58d45bc4a8f647bc25faa092a30b0e44d27198 (diff)
parentb0f03db51dc84aac56c807ecf4da8151c01e3c04 (diff)
Merge #5740
5740: Remove deprecated function r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
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()?) {