aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/diagnostics.rs')
-rw-r--r--crates/ra_ide_api/src/diagnostics.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs
index a499ac7c6..53d95fb4c 100644
--- a/crates/ra_ide_api/src/diagnostics.rs
+++ b/crates/ra_ide_api/src/diagnostics.rs
@@ -21,10 +21,8 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic>
21 let source_root = db.file_source_root(file_id); 21 let source_root = db.file_source_root(file_id);
22 let diag = match problem { 22 let diag = match problem {
23 Problem::UnresolvedModule { candidate } => { 23 Problem::UnresolvedModule { candidate } => {
24 let create_file = FileSystemEdit::CreateFile { 24 let create_file =
25 source_root, 25 FileSystemEdit::CreateFile { source_root, path: candidate.clone() };
26 path: candidate.clone(),
27 };
28 let fix = SourceChange { 26 let fix = SourceChange {
29 label: "create module".to_string(), 27 label: "create module".to_string(),
30 source_file_edits: Vec::new(), 28 source_file_edits: Vec::new(),
@@ -44,10 +42,8 @@ pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic>
44 dst_source_root: source_root, 42 dst_source_root: source_root,
45 dst_path: move_to.clone(), 43 dst_path: move_to.clone(),
46 }; 44 };
47 let create_file = FileSystemEdit::CreateFile { 45 let create_file =
48 source_root, 46 FileSystemEdit::CreateFile { source_root, path: move_to.join(candidate) };
49 path: move_to.join(candidate),
50 };
51 let fix = SourceChange { 47 let fix = SourceChange {
52 label: "move file and create module".to_string(), 48 label: "move file and create module".to_string(),
53 source_file_edits: Vec::new(), 49 source_file_edits: Vec::new(),