aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_db
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-26 08:51:36 +0000
committerAleksey Kladov <[email protected]>2019-01-26 08:51:36 +0000
commit9457b1f0e64d38e7dc24d8c66a52ffef759d4dbf (patch)
treea9703f8d4338d3b0be55b170ae4fff3d8441ab9d /crates/ra_db
parentac757e114e9dcbc70600803dd4adc4f99ecde78e (diff)
rename source_file -> parse
Diffstat (limited to 'crates/ra_db')
-rw-r--r--crates/ra_db/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs
index 2664dc69a..6e17f33f0 100644
--- a/crates/ra_db/src/lib.rs
+++ b/crates/ra_db/src/lib.rs
@@ -71,7 +71,7 @@ pub trait SourceDatabase: salsa::Database + CheckCanceled {
71 #[salsa::input] 71 #[salsa::input]
72 fn file_text(&self, file_id: FileId) -> Arc<String>; 72 fn file_text(&self, file_id: FileId) -> Arc<String>;
73 // Parses the file into the syntax tree. 73 // Parses the file into the syntax tree.
74 fn source_file(&self, file_id: FileId) -> TreeArc<SourceFile>; 74 fn parse(&self, file_id: FileId) -> TreeArc<SourceFile>;
75 /// Path to a file, relative to the root of its source root. 75 /// Path to a file, relative to the root of its source root.
76 #[salsa::input] 76 #[salsa::input]
77 fn file_relative_path(&self, file_id: FileId) -> RelativePathBuf; 77 fn file_relative_path(&self, file_id: FileId) -> RelativePathBuf;
@@ -98,7 +98,7 @@ fn source_root_crates(db: &impl SourceDatabase, id: SourceRootId) -> Arc<Vec<Cra
98 Arc::new(res) 98 Arc::new(res)
99} 99}
100 100
101fn source_file(db: &impl SourceDatabase, file_id: FileId) -> TreeArc<SourceFile> { 101fn parse(db: &impl SourceDatabase, file_id: FileId) -> TreeArc<SourceFile> {
102 let text = db.file_text(file_id); 102 let text = db.file_text(file_id);
103 SourceFile::parse(&*text) 103 SourceFile::parse(&*text)
104} 104}