File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -690,14 +690,16 @@ impl CodeMap {
690690 return 1 ;
691691 }
692692
693+ let src = local_begin. fm . external_src . borrow ( ) ;
694+
693695 // We need to extend the snippet to the end of the src rather than to end_index so when
694696 // searching forwards for boundaries we've got somewhere to search.
695697 let snippet = if let Some ( ref src) = local_begin. fm . src {
696698 let len = src. len ( ) ;
697- ( & src[ start_index..len] ) . to_string ( )
698- } else if let Some ( src) = local_begin . fm . external_src . borrow ( ) . get_source ( ) {
699+ ( & src[ start_index..len] )
700+ } else if let Some ( src) = src . get_source ( ) {
699701 let len = src. len ( ) ;
700- ( & src[ start_index..len] ) . to_string ( )
702+ ( & src[ start_index..len] )
701703 } else {
702704 return 1 ;
703705 } ;
You can’t perform that action at this time.
0 commit comments