Unnamed repository; edit this file 'description' to name the repository.
we can remove the add_predicate considering we no longer to in place edits
bit-aloo 2 weeks ago
parent 1e5ec33 · commit ba20168
-rw-r--r--crates/syntax/src/ast/make.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs
index e8f5c9537d..718e5e2dca 100644
--- a/crates/syntax/src/ast/make.rs
+++ b/crates/syntax/src/ast/make.rs
@@ -294,12 +294,7 @@ fn merge_where_clause(
(None, None) => None,
(None, Some(bs)) => Some(bs),
(Some(ps), None) => Some(ps),
- (Some(ps), Some(bs)) => {
- let preds = where_clause(std::iter::empty()).clone_for_update();
- ps.predicates().for_each(|p| preds.add_predicate(p));
- bs.predicates().for_each(|p| preds.add_predicate(p));
- Some(preds)
- }
+ (Some(ps), Some(bs)) => Some(where_clause(ps.predicates().chain(bs.predicates()))),
}
}