aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-03-24 11:56:43 +0000
committerGitHub <[email protected]>2020-03-24 11:56:43 +0000
commit7c2cc85806b6b9104e9d614aa71f841fd3627596 (patch)
tree1f8fd75c608a5a2636d32c94574c6e5aac76174b /crates/ra_syntax/src
parent6ef64622afd818d7b091e36b8228bc8ebd52d2e1 (diff)
parent9bf2cd609c772a4ddccd7af67e8da9a3cb6e110f (diff)
Merge #3705
3705: Align naming r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast/edit.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs
index 68dae008f..324327162 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -296,11 +296,11 @@ impl ast::UseTree {
296} 296}
297 297
298#[must_use] 298#[must_use]
299pub fn strip_attrs_and_docs<N: ast::AttrsOwner>(node: &N) -> N { 299pub fn remove_attrs_and_docs<N: ast::AttrsOwner>(node: &N) -> N {
300 N::cast(strip_attrs_and_docs_inner(node.syntax().clone())).unwrap() 300 N::cast(remove_attrs_and_docs_inner(node.syntax().clone())).unwrap()
301} 301}
302 302
303fn strip_attrs_and_docs_inner(mut node: SyntaxNode) -> SyntaxNode { 303fn remove_attrs_and_docs_inner(mut node: SyntaxNode) -> SyntaxNode {
304 while let Some(start) = 304 while let Some(start) =
305 node.children_with_tokens().find(|it| it.kind() == ATTR || it.kind() == COMMENT) 305 node.children_with_tokens().find(|it| it.kind() == ATTR || it.kind() == COMMENT)
306 { 306 {