aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_ssr/src/replacing.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_ssr/src/replacing.rs')
-rw-r--r--crates/ide_ssr/src/replacing.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide_ssr/src/replacing.rs b/crates/ide_ssr/src/replacing.rs
index c9ccc1961..9265af7c1 100644
--- a/crates/ide_ssr/src/replacing.rs
+++ b/crates/ide_ssr/src/replacing.rs
@@ -84,16 +84,16 @@ impl ReplacementRenderer<'_> {
84 fn render_node_or_token(&mut self, node_or_token: &SyntaxElement) { 84 fn render_node_or_token(&mut self, node_or_token: &SyntaxElement) {
85 match node_or_token { 85 match node_or_token {
86 SyntaxElement::Token(token) => { 86 SyntaxElement::Token(token) => {
87 self.render_token(&token); 87 self.render_token(token);
88 } 88 }
89 SyntaxElement::Node(child_node) => { 89 SyntaxElement::Node(child_node) => {
90 self.render_node(&child_node); 90 self.render_node(child_node);
91 } 91 }
92 } 92 }
93 } 93 }
94 94
95 fn render_node(&mut self, node: &SyntaxNode) { 95 fn render_node(&mut self, node: &SyntaxNode) {
96 if let Some(mod_path) = self.match_info.rendered_template_paths.get(&node) { 96 if let Some(mod_path) = self.match_info.rendered_template_paths.get(node) {
97 self.out.push_str(&mod_path.to_string()); 97 self.out.push_str(&mod_path.to_string());
98 // Emit everything except for the segment's name-ref, since we already effectively 98 // Emit everything except for the segment's name-ref, since we already effectively
99 // emitted that as part of `mod_path`. 99 // emitted that as part of `mod_path`.
@@ -107,12 +107,12 @@ impl ReplacementRenderer<'_> {
107 } 107 }
108 } 108 }
109 } else { 109 } else {
110 self.render_node_children(&node); 110 self.render_node_children(node);
111 } 111 }
112 } 112 }
113 113
114 fn render_token(&mut self, token: &SyntaxToken) { 114 fn render_token(&mut self, token: &SyntaxToken) {
115 if let Some(placeholder) = self.rule.get_placeholder(&token) { 115 if let Some(placeholder) = self.rule.get_placeholder(token) {
116 if let Some(placeholder_value) = 116 if let Some(placeholder_value) =
117 self.match_info.placeholder_values.get(&placeholder.ident) 117 self.match_info.placeholder_values.get(&placeholder.ident)
118 { 118 {