From 6e24321e4579d25686982002ed18f321db23cb9f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 9 Dec 2020 19:01:15 +0300 Subject: Introduce anchored_path They allow to represent paths like `#[path = "C:\path.rs"] mod foo;` in a lossless cross-platform & network-transparent way. --- crates/ide_db/src/source_change.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ide_db/src/source_change.rs') diff --git a/crates/ide_db/src/source_change.rs b/crates/ide_db/src/source_change.rs index f1590ec66..e87d98dad 100644 --- a/crates/ide_db/src/source_change.rs +++ b/crates/ide_db/src/source_change.rs @@ -3,7 +3,7 @@ //! //! It can be viewed as a dual for `AnalysisChange`. -use base_db::FileId; +use base_db::{AnchoredPathBuf, FileId}; use text_edit::TextEdit; #[derive(Default, Debug, Clone)] @@ -44,8 +44,8 @@ impl From> for SourceChange { #[derive(Debug, Clone)] pub enum FileSystemEdit { - CreateFile { anchor: FileId, dst: String }, - MoveFile { src: FileId, anchor: FileId, dst: String }, + CreateFile { dst: AnchoredPathBuf }, + MoveFile { src: FileId, dst: AnchoredPathBuf }, } impl From for SourceChange { -- cgit v1.2.3