File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -660,15 +660,10 @@ impl Backend {
660660
661661 // ── Phase 1: collect and cache fast diagnostics ─────────────
662662 let mut fast_diagnostics = Vec :: new ( ) ;
663- {
664- let vc_handle = self . blade_virtual_content . read ( ) ;
665- let effective_content = vc_handle
666- . get ( uri_str)
667- . map ( |s| s. as_str ( ) )
668- . unwrap_or ( content) ;
669-
670- self . collect_fast_diagnostics ( uri_str, effective_content, & mut fast_diagnostics) ;
671- }
663+ let effective_content_owned: Option < String > =
664+ self . blade_virtual_content . read ( ) . get ( uri_str) . cloned ( ) ;
665+ let effective_content = effective_content_owned. as_deref ( ) . unwrap_or ( content) ;
666+ self . collect_fast_diagnostics ( uri_str, effective_content, & mut fast_diagnostics) ;
672667
673668 {
674669 let mut cache = self . diag_last_fast . lock ( ) ;
@@ -690,12 +685,9 @@ impl Backend {
690685 & self . resolved_class_cache ,
691686 ) ;
692687
693- let vc_handle = self . blade_virtual_content . read ( ) ;
694- let effective_content = vc_handle
695- . get ( uri_str)
696- . map ( |s| s. as_str ( ) )
697- . unwrap_or ( content) ;
698-
688+ let effective_content_owned: Option < String > =
689+ self . blade_virtual_content . read ( ) . get ( uri_str) . cloned ( ) ;
690+ let effective_content = effective_content_owned. as_deref ( ) . unwrap_or ( content) ;
699691 self . collect_slow_diagnostics ( uri_str, effective_content, & mut slow_diagnostics) ;
700692 }
701693
You can’t perform that action at this time.
0 commit comments