diff options
author | Aleksey Kladov <[email protected]> | 2019-02-18 11:21:25 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-02-18 11:29:39 +0000 |
commit | 062aa9723583cd6dae17b3bbe604ec7ad6c0394b (patch) | |
tree | 059b9b1db3eb6c859fdc2fcc229d75a671b9f6c8 /crates/ra_vfs | |
parent | 74288ae272029262beffb7696752a222e36fe49e (diff) |
move public API to top of the file
Diffstat (limited to 'crates/ra_vfs')
-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 | } | ||