File tree Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -168,22 +168,24 @@ impl GlobalState {
168168 }
169169 }
170170 vfs:: loader:: Message :: Progress { n_total, n_done } => {
171- let state = if n_done == 0 {
172- Progress :: Begin
173- } else if n_done < n_total {
174- Progress :: Report
175- } else {
176- assert_eq ! ( n_done, n_total) ;
177- self . status = Status :: Ready ;
178- became_ready = true ;
179- Progress :: End
180- } ;
181- self . report_progress (
182- "roots scanned" ,
183- state,
184- Some ( format ! ( "{}/{}" , n_done, n_total) ) ,
185- Some ( Progress :: percentage ( n_done, n_total) ) ,
186- )
171+ if n_total > 0 {
172+ let state = if n_done == 0 {
173+ Progress :: Begin
174+ } else if n_done < n_total {
175+ Progress :: Report
176+ } else {
177+ assert_eq ! ( n_done, n_total) ;
178+ self . status = Status :: Ready ;
179+ became_ready = true ;
180+ Progress :: End
181+ } ;
182+ self . report_progress (
183+ "roots scanned" ,
184+ state,
185+ Some ( format ! ( "{}/{}" , n_done, n_total) ) ,
186+ Some ( Progress :: percentage ( n_done, n_total) ) ,
187+ )
188+ }
187189 }
188190 } ,
189191 Event :: Flycheck ( task) => match task {
You can’t perform that action at this time.
0 commit comments