11use std:: collections:: HashSet ;
22use std:: path:: Path ;
3- use std:: sync:: atomic:: { AtomicBool , AtomicI64 , AtomicU8 , Ordering } ;
3+ use std:: sync:: atomic:: { AtomicI64 , AtomicU8 , Ordering } ;
44use std:: { path:: PathBuf , sync:: Arc , time:: Duration } ;
55
66use super :: { ClientProxy , FileDiagnostic , StatusBar } ;
@@ -26,7 +26,6 @@ pub struct WorkspaceManager {
2626 pub watcher : Option < notify:: RecommendedWatcher > ,
2727 pub current_open_files : HashSet < Uri > ,
2828 pub match_file_pattern : WorkspaceFileMatcher ,
29- pub workspace_initialized : Arc < AtomicBool > ,
3029 workspace_diagnostic_level : Arc < AtomicU8 > ,
3130 workspace_version : Arc < AtomicI64 > ,
3231}
@@ -51,24 +50,13 @@ impl WorkspaceManager {
5150 watcher : None ,
5251 current_open_files : HashSet :: new ( ) ,
5352 match_file_pattern : WorkspaceFileMatcher :: default ( ) ,
54- workspace_initialized : Arc :: new ( AtomicBool :: new ( false ) ) ,
5553 workspace_diagnostic_level : Arc :: new ( AtomicU8 :: new (
5654 WorkspaceDiagnosticLevel :: Fast . to_u8 ( ) ,
5755 ) ) ,
5856 workspace_version : Arc :: new ( AtomicI64 :: new ( 0 ) ) ,
5957 }
6058 }
6159
62- pub fn is_workspace_initialized ( & self ) -> bool {
63- self . workspace_initialized
64- . load ( std:: sync:: atomic:: Ordering :: SeqCst )
65- }
66-
67- pub fn set_workspace_initialized ( & self ) {
68- self . workspace_initialized
69- . store ( true , std:: sync:: atomic:: Ordering :: SeqCst ) ;
70- }
71-
7260 pub fn get_workspace_diagnostic_level ( & self ) -> WorkspaceDiagnosticLevel {
7361 let value = self . workspace_diagnostic_level . load ( Ordering :: Acquire ) ;
7462 WorkspaceDiagnosticLevel :: from_u8 ( value)
0 commit comments