aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src/ast
diff options
context:
space:
mode:
Diffstat (limited to 'crates/syntax/src/ast')
-rw-r--r--crates/syntax/src/ast/edit_in_place.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/syntax/src/ast/edit_in_place.rs b/crates/syntax/src/ast/edit_in_place.rs
index 7adfe5e16..449b058fb 100644
--- a/crates/syntax/src/ast/edit_in_place.rs
+++ b/crates/syntax/src/ast/edit_in_place.rs
@@ -102,17 +102,17 @@ impl GenericParamsOwnerEdit for ast::Enum {
102fn create_where_clause(position: Position) { 102fn create_where_clause(position: Position) {
103 let where_clause: SyntaxElement = 103 let where_clause: SyntaxElement =
104 make::where_clause(empty()).clone_for_update().syntax().clone().into(); 104 make::where_clause(empty()).clone_for_update().syntax().clone().into();
105 ted::insert_ws(position, where_clause); 105 ted::insert(position, where_clause);
106} 106}
107 107
108impl ast::WhereClause { 108impl ast::WhereClause {
109 pub fn add_predicate(&self, predicate: ast::WherePred) { 109 pub fn add_predicate(&self, predicate: ast::WherePred) {
110 if let Some(pred) = self.predicates().last() { 110 if let Some(pred) = self.predicates().last() {
111 if !pred.syntax().siblings_with_tokens(Direction::Next).any(|it| it.kind() == T![,]) { 111 if !pred.syntax().siblings_with_tokens(Direction::Next).any(|it| it.kind() == T![,]) {
112 ted::append_child(self.syntax().clone(), make::token(T![,])); 112 ted::append_child_raw(self.syntax().clone(), make::token(T![,]));
113 } 113 }
114 } 114 }
115 ted::append_child_ws(self.syntax().clone(), predicate.syntax().clone()) 115 ted::append_child(self.syntax().clone(), predicate.syntax().clone())
116 } 116 }
117} 117}
118 118