File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ impl Context {
5858
5959 if let ContextResult :: Success ( value) = res {
6060 let mut curr = value;
61+ log:: debug!( "Tracing down value: {:?}" , curr) ;
6162
6263 for path in reference. paths {
6364 if let Some ( index) = path. array_index {
@@ -75,23 +76,20 @@ impl Context {
7576 }
7677 }
7778
78- if let Some ( path) = path. path {
79- let splits = path. split ( "." ) ;
80-
81- for part in splits {
82- match curr. kind {
83- Some ( ref kind) => {
84- if let Kind :: StructValue ( struct_value) = & kind {
85- match struct_value. fields . get ( part) {
86- Some ( x) => {
87- curr = x. clone ( ) ;
88- }
89- None => return ContextResult :: NotFound ,
79+ if let Some ( field_name) = path. path {
80+ match curr. kind {
81+ Some ( ref kind) => {
82+ if let Kind :: StructValue ( struct_value) = & kind {
83+ match struct_value. fields . get ( & field_name) {
84+ Some ( x) => {
85+ log:: debug!( "Updating trace value to: {:?}" , x) ;
86+ curr = x. clone ( ) ;
9087 }
88+ None => return ContextResult :: NotFound ,
9189 }
9290 }
93- None => return ContextResult :: NotFound ,
9491 }
92+ None => return ContextResult :: NotFound ,
9593 }
9694 }
9795 }
You can’t perform that action at this time.
0 commit comments