aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/mock_analysis.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/mock_analysis.rs')
-rw-r--r--crates/ra_ide_api/src/mock_analysis.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/mock_analysis.rs b/crates/ra_ide_api/src/mock_analysis.rs
index 4dbbd489a..132f6f875 100644
--- a/crates/ra_ide_api/src/mock_analysis.rs
+++ b/crates/ra_ide_api/src/mock_analysis.rs
@@ -62,13 +62,13 @@ impl MockAnalysis {
62 pub fn add_file_with_position(&mut self, path: &str, text: &str) -> FilePosition { 62 pub fn add_file_with_position(&mut self, path: &str, text: &str) -> FilePosition {
63 let (offset, text) = extract_offset(text); 63 let (offset, text) = extract_offset(text);
64 let file_id = FileId((self.files.len() + 1) as u32); 64 let file_id = FileId((self.files.len() + 1) as u32);
65 self.files.push((path.to_string(), text.to_string())); 65 self.files.push((path.to_string(), text));
66 FilePosition { file_id, offset } 66 FilePosition { file_id, offset }
67 } 67 }
68 pub fn add_file_with_range(&mut self, path: &str, text: &str) -> FileRange { 68 pub fn add_file_with_range(&mut self, path: &str, text: &str) -> FileRange {
69 let (range, text) = extract_range(text); 69 let (range, text) = extract_range(text);
70 let file_id = FileId((self.files.len() + 1) as u32); 70 let file_id = FileId((self.files.len() + 1) as u32);
71 self.files.push((path.to_string(), text.to_string())); 71 self.files.push((path.to_string(), text));
72 FileRange { file_id, range } 72 FileRange { file_id, range }
73 } 73 }
74 pub fn id_of(&self, path: &str) -> FileId { 74 pub fn id_of(&self, path: &str) -> FileId {