diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_vfs/src/lib.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_vfs/src/lib.rs b/crates/ra_vfs/src/lib.rs index d07bc5694..8005c4ff8 100644 --- a/crates/ra_vfs/src/lib.rs +++ b/crates/ra_vfs/src/lib.rs | |||
@@ -66,6 +66,14 @@ impl fmt::Debug for Vfs { | |||
66 | } | 66 | } |
67 | } | 67 | } |
68 | 68 | ||
69 | #[derive(Debug, Clone)] | ||
70 | pub enum VfsChange { | ||
71 | AddRoot { root: VfsRoot, files: Vec<(VfsFile, RelativePathBuf, Arc<String>)> }, | ||
72 | AddFile { root: VfsRoot, file: VfsFile, path: RelativePathBuf, text: Arc<String> }, | ||
73 | RemoveFile { root: VfsRoot, file: VfsFile, path: RelativePathBuf }, | ||
74 | ChangeFile { file: VfsFile, text: Arc<String> }, | ||
75 | } | ||
76 | |||
69 | impl Vfs { | 77 | impl Vfs { |
70 | pub fn new(roots: Vec<PathBuf>) -> (Vfs, Vec<VfsRoot>) { | 78 | pub fn new(roots: Vec<PathBuf>) -> (Vfs, Vec<VfsRoot>) { |
71 | let roots = Arc::new(Roots::new(roots)); | 79 | let roots = Arc::new(Roots::new(roots)); |
@@ -276,11 +284,3 @@ impl Vfs { | |||
276 | &mut self.files[file.0 as usize] | 284 | &mut self.files[file.0 as usize] |
277 | } | 285 | } |
278 | } | 286 | } |
279 | |||
280 | #[derive(Debug, Clone)] | ||
281 | pub enum VfsChange { | ||
282 | AddRoot { root: VfsRoot, files: Vec<(VfsFile, RelativePathBuf, Arc<String>)> }, | ||
283 | AddFile { root: VfsRoot, file: VfsFile, path: RelativePathBuf, text: Arc<String> }, | ||
284 | RemoveFile { root: VfsRoot, file: VfsFile, path: RelativePathBuf }, | ||
285 | ChangeFile { file: VfsFile, text: Arc<String> }, | ||
286 | } | ||