aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-03-09 10:19:26 +0000
committerGitHub <[email protected]>2020-03-09 10:19:26 +0000
commita6133206d1614624bbb51650d33fae04d70bc21a (patch)
tree461dd502837fe3091e0057f31faa1515fca1ca49 /crates/ra_ide/src/lib.rs
parent0dbd8ff59b854570329c325431126a078505e5f5 (diff)
parent100cbc57ce2bd903ecab7d8bfb0abf7777076510 (diff)
Merge #3527
3527: Simplify r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/lib.rs')
-rw-r--r--crates/ra_ide/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs
index 903624381..c60e86aea 100644
--- a/crates/ra_ide/src/lib.rs
+++ b/crates/ra_ide/src/lib.rs
@@ -421,12 +421,12 @@ impl Analysis {
421 421
422 /// Returns the edition of the given crate. 422 /// Returns the edition of the given crate.
423 pub fn crate_edition(&self, crate_id: CrateId) -> Cancelable<Edition> { 423 pub fn crate_edition(&self, crate_id: CrateId) -> Cancelable<Edition> {
424 self.with_db(|db| db.crate_graph().crate_data(&crate_id).edition) 424 self.with_db(|db| db.crate_graph()[crate_id].edition)
425 } 425 }
426 426
427 /// Returns the root file of the given crate. 427 /// Returns the root file of the given crate.
428 pub fn crate_root(&self, crate_id: CrateId) -> Cancelable<FileId> { 428 pub fn crate_root(&self, crate_id: CrateId) -> Cancelable<FileId> {
429 self.with_db(|db| db.crate_graph().crate_data(&crate_id).root_file_id) 429 self.with_db(|db| db.crate_graph()[crate_id].root_file_id)
430 } 430 }
431 431
432 /// Returns the set of possible targets to run for the current file. 432 /// Returns the set of possible targets to run for the current file.