diff options
author | Aleksey Kladov <[email protected]> | 2019-01-02 17:12:38 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-02 17:12:38 +0000 |
commit | 28f6eedba59d3a5dd43fe6fbde3d19d54d0e2f9d (patch) | |
tree | 55074a42a5b17515fc6e328bf3270838cb70db23 /crates/ra_analysis/src/lib.rs | |
parent | ef08b6c084fc2676655fe6dfb693ab097d3f9fd9 (diff) |
simplify runnables
Diffstat (limited to 'crates/ra_analysis/src/lib.rs')
-rw-r--r-- | crates/ra_analysis/src/lib.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs index 54eb2f4d3..a01febf4e 100644 --- a/crates/ra_analysis/src/lib.rs +++ b/crates/ra_analysis/src/lib.rs | |||
@@ -382,10 +382,6 @@ impl Analysis { | |||
382 | pub fn parent_module(&self, position: FilePosition) -> Cancelable<Vec<NavigationTarget>> { | 382 | pub fn parent_module(&self, position: FilePosition) -> Cancelable<Vec<NavigationTarget>> { |
383 | self.db.parent_module(position) | 383 | self.db.parent_module(position) |
384 | } | 384 | } |
385 | /// Returns `::` separated path to the current module from the crate root. | ||
386 | pub fn module_path(&self, position: FilePosition) -> Cancelable<Option<String>> { | ||
387 | self.db.module_path(position) | ||
388 | } | ||
389 | /// Returns crates this file belongs too. | 385 | /// Returns crates this file belongs too. |
390 | pub fn crate_for(&self, file_id: FileId) -> Cancelable<Vec<CrateId>> { | 386 | pub fn crate_for(&self, file_id: FileId) -> Cancelable<Vec<CrateId>> { |
391 | self.db.crate_for(file_id) | 387 | self.db.crate_for(file_id) |
@@ -396,8 +392,7 @@ impl Analysis { | |||
396 | } | 392 | } |
397 | /// Returns the set of possible targets to run for the current file. | 393 | /// Returns the set of possible targets to run for the current file. |
398 | pub fn runnables(&self, file_id: FileId) -> Cancelable<Vec<Runnable>> { | 394 | pub fn runnables(&self, file_id: FileId) -> Cancelable<Vec<Runnable>> { |
399 | let file = self.db.source_file(file_id); | 395 | runnables::runnables(&*self.db, file_id) |
400 | Ok(runnables::runnables(self, &file, file_id)) | ||
401 | } | 396 | } |
402 | /// Computes syntax highlighting for the given file. | 397 | /// Computes syntax highlighting for the given file. |
403 | pub fn highlight(&self, file_id: FileId) -> Cancelable<Vec<HighlightedRange>> { | 398 | pub fn highlight(&self, file_id: FileId) -> Cancelable<Vec<HighlightedRange>> { |