File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
crates/syntax/src/ast/syntax_factory Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ impl SyntaxFactory {
7171 ast
7272 }
7373
74-
7574 pub fn path_from_text ( & self , text : & str ) -> ast:: Path {
7675 make:: path_from_text ( text) . clone_for_update ( )
7776 }
@@ -213,10 +212,10 @@ impl SyntaxFactory {
213212
214213 if let Some ( mut mapping) = self . mappings ( ) {
215214 let mut builder = SyntaxMappingBuilder :: new ( ast. syntax ( ) . clone ( ) ) ;
216- if let Some ( self_param) = self_param {
217- if let Some ( new_self_param) = ast. self_param ( ) {
218- builder . map_node ( self_param . syntax ( ) . clone ( ) , new_self_param . syntax ( ) . clone ( ) ) ;
219- }
215+ if let Some ( self_param) = self_param
216+ && let Some ( new_self_param) = ast. self_param ( )
217+ {
218+ builder . map_node ( self_param . syntax ( ) . clone ( ) , new_self_param . syntax ( ) . clone ( ) ) ;
220219 }
221220 builder. map_children ( input, ast. params ( ) . map ( |p| p. syntax ( ) . clone ( ) ) ) ;
222221 builder. finish ( & mut mapping) ;
You can’t perform that action at this time.
0 commit comments