diff options
Diffstat (limited to 'crates/vfs/src/loader.rs')
-rw-r--r-- | crates/vfs/src/loader.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/vfs/src/loader.rs b/crates/vfs/src/loader.rs index d3bdae562..473b29fcb 100644 --- a/crates/vfs/src/loader.rs +++ b/crates/vfs/src/loader.rs | |||
@@ -32,6 +32,9 @@ pub struct Directories { | |||
32 | /// [`Handle`]'s configuration. | 32 | /// [`Handle`]'s configuration. |
33 | #[derive(Debug)] | 33 | #[derive(Debug)] |
34 | pub struct Config { | 34 | pub struct Config { |
35 | /// Version number to associate progress updates to the right config | ||
36 | /// version. | ||
37 | pub version: u32, | ||
35 | /// Set of initially loaded files. | 38 | /// Set of initially loaded files. |
36 | pub load: Vec<Entry>, | 39 | pub load: Vec<Entry>, |
37 | /// Index of watched entries in `load`. | 40 | /// Index of watched entries in `load`. |
@@ -45,7 +48,7 @@ pub enum Message { | |||
45 | /// Indicate a gradual progress. | 48 | /// Indicate a gradual progress. |
46 | /// | 49 | /// |
47 | /// This is supposed to be the number of loaded files. | 50 | /// This is supposed to be the number of loaded files. |
48 | Progress { n_total: usize, n_done: usize }, | 51 | Progress { n_total: usize, n_done: usize, config_version: u32 }, |
49 | /// The handle loaded the following files' content. | 52 | /// The handle loaded the following files' content. |
50 | Loaded { files: Vec<(AbsPathBuf, Option<Vec<u8>>)> }, | 53 | Loaded { files: Vec<(AbsPathBuf, Option<Vec<u8>>)> }, |
51 | } | 54 | } |
@@ -196,10 +199,11 @@ impl fmt::Debug for Message { | |||
196 | Message::Loaded { files } => { | 199 | Message::Loaded { files } => { |
197 | f.debug_struct("Loaded").field("n_files", &files.len()).finish() | 200 | f.debug_struct("Loaded").field("n_files", &files.len()).finish() |
198 | } | 201 | } |
199 | Message::Progress { n_total, n_done } => f | 202 | Message::Progress { n_total, n_done, config_version } => f |
200 | .debug_struct("Progress") | 203 | .debug_struct("Progress") |
201 | .field("n_total", n_total) | 204 | .field("n_total", n_total) |
202 | .field("n_done", n_done) | 205 | .field("n_done", n_done) |
206 | .field("config_version", config_version) | ||
203 | .finish(), | 207 | .finish(), |
204 | } | 208 | } |
205 | } | 209 | } |