diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 15:34:09 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-15 15:34:09 +0000 |
commit | 05149d353299b54476410daeda6551e1261128ef (patch) | |
tree | e757ea3f647159de8ce49e43177e10c43f61d2bf /crates/ra_ide_api/src/imp.rs | |
parent | 91feed736f91a3790b2f5a5d0d879c06843bce95 (diff) | |
parent | 8af9a18660f9b2f34da902f43c1eef856af1cfca (diff) |
Merge #551
551: remove Cancelable from Module API, part 2 r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/imp.rs')
-rw-r--r-- | crates/ra_ide_api/src/imp.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide_api/src/imp.rs b/crates/ra_ide_api/src/imp.rs index 76cb312dd..3ef11dfa1 100644 --- a/crates/ra_ide_api/src/imp.rs +++ b/crates/ra_ide_api/src/imp.rs | |||
@@ -99,16 +99,16 @@ impl db::RootDatabase { | |||
99 | 99 | ||
100 | impl db::RootDatabase { | 100 | impl db::RootDatabase { |
101 | /// Returns `Vec` for the same reason as `parent_module` | 101 | /// Returns `Vec` for the same reason as `parent_module` |
102 | pub(crate) fn crate_for(&self, file_id: FileId) -> Cancelable<Vec<CrateId>> { | 102 | pub(crate) fn crate_for(&self, file_id: FileId) -> Vec<CrateId> { |
103 | let module = match source_binder::module_from_file_id(self, file_id) { | 103 | let module = match source_binder::module_from_file_id(self, file_id) { |
104 | Some(it) => it, | 104 | Some(it) => it, |
105 | None => return Ok(Vec::new()), | 105 | None => return Vec::new(), |
106 | }; | 106 | }; |
107 | let krate = match module.krate(self)? { | 107 | let krate = match module.krate(self) { |
108 | Some(it) => it, | 108 | Some(it) => it, |
109 | None => return Ok(Vec::new()), | 109 | None => return Vec::new(), |
110 | }; | 110 | }; |
111 | Ok(vec![krate.crate_id()]) | 111 | vec![krate.crate_id()] |
112 | } | 112 | } |
113 | pub(crate) fn find_all_refs( | 113 | pub(crate) fn find_all_refs( |
114 | &self, | 114 | &self, |