File tree 3 files changed +11
-17
lines changed
3 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -586,7 +586,7 @@ impl GlobalState {
586
586
}
587
587
}
588
588
}
589
- vfs:: loader:: Message :: Progress { n_total, n_done, file , config_version } => {
589
+ vfs:: loader:: Message :: Progress { n_total, n_done, dir , config_version } => {
590
590
always ! ( config_version <= self . vfs_config_version) ;
591
591
592
592
self . vfs_progress_config_version = config_version;
@@ -603,12 +603,12 @@ impl GlobalState {
603
603
} ;
604
604
605
605
let mut message = format ! ( "{n_done}/{n_total}" ) ;
606
- if let Some ( file ) = file {
606
+ if let Some ( dir ) = dir {
607
607
message += & format ! (
608
608
": {}" ,
609
- match file . strip_prefix( & self . config. root_path( ) ) {
609
+ match dir . strip_prefix( & self . config. root_path( ) ) {
610
610
Some ( relative_path) => relative_path. as_ref( ) ,
611
- None => file . as_ref( ) ,
611
+ None => dir . as_ref( ) ,
612
612
}
613
613
. display( )
614
614
) ;
Original file line number Diff line number Diff line change @@ -107,18 +107,12 @@ impl NotifyActor {
107
107
n_total,
108
108
n_done : 0 ,
109
109
config_version,
110
- file : None ,
110
+ dir : None ,
111
111
} ) ;
112
112
113
113
self . watched_entries . clear ( ) ;
114
114
115
115
for ( i, entry) in config. load . into_iter ( ) . enumerate ( ) {
116
- self . send ( loader:: Message :: Progress {
117
- n_total,
118
- n_done : i,
119
- config_version,
120
- file : None ,
121
- } ) ;
122
116
let watch = config. watch . contains ( & i) ;
123
117
if watch {
124
118
self . watched_entries . push ( entry. clone ( ) ) ;
@@ -127,15 +121,15 @@ impl NotifyActor {
127
121
self . load_entry ( entry, watch, |file| loader:: Message :: Progress {
128
122
n_total,
129
123
n_done : i,
130
- file : Some ( file) ,
124
+ dir : Some ( file) ,
131
125
config_version,
132
126
} ) ;
133
127
self . send ( loader:: Message :: Loaded { files } ) ;
134
128
self . send ( loader:: Message :: Progress {
135
129
n_total,
136
130
n_done : i + 1 ,
137
131
config_version,
138
- file : None ,
132
+ dir : None ,
139
133
} ) ;
140
134
}
141
135
}
Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ pub enum Message {
53
53
n_total : usize ,
54
54
/// The files that have been loaded successfully.
55
55
n_done : usize ,
56
- /// The file being loaded, if any .
57
- file : Option < AbsPathBuf > ,
56
+ /// The dir being loaded, `None` if its for a file .
57
+ dir : Option < AbsPathBuf > ,
58
58
/// The [`Config`] version.
59
59
config_version : u32 ,
60
60
} ,
@@ -213,11 +213,11 @@ impl fmt::Debug for Message {
213
213
Message :: Changed { files } => {
214
214
f. debug_struct ( "Changed" ) . field ( "n_files" , & files. len ( ) ) . finish ( )
215
215
}
216
- Message :: Progress { n_total, n_done, file , config_version } => f
216
+ Message :: Progress { n_total, n_done, dir , config_version } => f
217
217
. debug_struct ( "Progress" )
218
218
. field ( "n_total" , n_total)
219
219
. field ( "n_done" , n_done)
220
- . field ( "file " , file )
220
+ . field ( "dir " , dir )
221
221
. field ( "config_version" , config_version)
222
222
. finish ( ) ,
223
223
}
You can’t perform that action at this time.
0 commit comments