We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b2ce569 + 3cbcf89 commit 49094dbCopy full SHA for 49094db
crates/syntax/src/syntax_editor/mapping.rs
@@ -161,7 +161,7 @@ impl SyntaxMapping {
161
// Try to follow the mapping tree, if it exists
162
let input_mapping = self.upmap_node_single(input);
163
let input_ancestor =
164
- input.ancestors().find_map(|ancestor| self.upmap_node_single(&ancestor));
+ input.ancestors().find(|ancestor| self.upmap_node_single(ancestor).is_some());
165
166
match (input_mapping, input_ancestor) {
167
(Some(input_mapping), _) => {
0 commit comments