diff options
author | Aleksey Kladov <[email protected]> | 2019-01-06 10:45:55 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-06 14:35:29 +0000 |
commit | 1836f4db35b29cd325b04978776a902679bd9ce6 (patch) | |
tree | a6d9d4f08fa29211fcdcebd2c5612000cbe7b708 | |
parent | b37fba7136c0191ae0becb3104d2d5746c50c3f1 (diff) |
make source cancelable
-rw-r--r-- | crates/ra_hir/src/code_model_api.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index f1e891722..6bbc80e17 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs | |||
@@ -35,8 +35,8 @@ pub struct Module { | |||
35 | } | 35 | } |
36 | 36 | ||
37 | impl Module { | 37 | impl Module { |
38 | pub fn source(&self, db: &impl HirDatabase) -> (FileId, Option<ast::ModuleNode>) { | 38 | pub fn source(&self, db: &impl HirDatabase) -> Cancelable<(FileId, Option<ast::ModuleNode>)> { |
39 | self.source_impl(db) | 39 | Ok(self.source_impl(db)) |
40 | } | 40 | } |
41 | 41 | ||
42 | /// Returns the crate this module is part of. | 42 | /// Returns the crate this module is part of. |