From 062aa9723583cd6dae17b3bbe604ec7ad6c0394b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 18 Feb 2019 14:21:25 +0300 Subject: move public API to top of the file --- crates/ra_vfs/src/lib.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'crates/ra_vfs') 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 { } } +#[derive(Debug, Clone)] +pub enum VfsChange { + AddRoot { root: VfsRoot, files: Vec<(VfsFile, RelativePathBuf, Arc)> }, + AddFile { root: VfsRoot, file: VfsFile, path: RelativePathBuf, text: Arc }, + RemoveFile { root: VfsRoot, file: VfsFile, path: RelativePathBuf }, + ChangeFile { file: VfsFile, text: Arc }, +} + impl Vfs { pub fn new(roots: Vec) -> (Vfs, Vec) { let roots = Arc::new(Roots::new(roots)); @@ -276,11 +284,3 @@ impl Vfs { &mut self.files[file.0 as usize] } } - -#[derive(Debug, Clone)] -pub enum VfsChange { - AddRoot { root: VfsRoot, files: Vec<(VfsFile, RelativePathBuf, Arc)> }, - AddFile { root: VfsRoot, file: VfsFile, path: RelativePathBuf, text: Arc }, - RemoveFile { root: VfsRoot, file: VfsFile, path: RelativePathBuf }, - ChangeFile { file: VfsFile, text: Arc }, -} -- cgit v1.2.3