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 {
690
690
return 1 ;
691
691
}
692
692
693
+ let src = local_begin. fm . external_src . borrow ( ) ;
694
+
693
695
// We need to extend the snippet to the end of the src rather than to end_index so when
694
696
// searching forwards for boundaries we've got somewhere to search.
695
697
let snippet = if let Some ( ref src) = local_begin. fm . src {
696
698
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 ( ) {
699
701
let len = src. len ( ) ;
700
- ( & src[ start_index..len] ) . to_string ( )
702
+ ( & src[ start_index..len] )
701
703
} else {
702
704
return 1 ;
703
705
} ;
You can’t perform that action at this time.
0 commit comments