aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_vfs/src/lib.rs16
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)]
70pub 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
69impl Vfs { 77impl 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)]
281pub 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}