File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -985,24 +985,21 @@ impl AnalyzerContext {
985985 let mut current_scope = op_scope. as_ref ( ) ;
986986
987987 // Walk up the parent chain to collect scope names
988- loop {
989- if let Some ( ( parent, _) ) = & current_scope. parent {
990- scope_names. push ( current_scope. name . clone ( ) ) ;
991- current_scope = parent. as_ref ( ) ;
992- } else {
993- break ;
994- }
988+ while let Some ( ( parent, _) ) = & current_scope. parent {
989+ scope_names. push ( current_scope. name . as_str ( ) ) ;
990+ current_scope = parent. as_ref ( ) ;
995991 }
996992
997993 // Reverse to get the correct order (root to leaf)
998994 scope_names. reverse ( ) ;
999995
1000- // Build the qualifier string: "" for root, "name." for single level, "parent.child." for nested
1001- if scope_names . is_empty ( ) {
1002- String :: new ( )
1003- } else {
1004- format ! ( "{}." , scope_names . join ( "." ) )
996+ // Build the qualifier string
997+ let mut result = String :: new ( ) ;
998+ for name in scope_names {
999+ result . push_str ( & name ) ;
1000+ result . push ( '.' ) ;
10051001 }
1002+ result
10061003 }
10071004}
10081005
You can’t perform that action at this time.
0 commit comments