diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-04 22:07:11 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-04 22:07:11 +0000 |
commit | 46d37a81ac82916ec67a2419a891c81d8ae01919 (patch) | |
tree | f714271189e0267324265830e4c3dc513b81cb11 /crates/ra_ide | |
parent | 1fe0b8c03fa613262afd2d612c55cc3a11249c7e (diff) | |
parent | b437dca4bd100c0a7a498d5960d566a0ccd92432 (diff) |
Merge #2477
2477: Run rustfmt with respect to Cargo.toml edition r=matklad a=Speedy37
Fixes #2146
Fixes #1959
Co-authored-by: Vincent Rouillé <[email protected]>
Diffstat (limited to 'crates/ra_ide')
-rw-r--r-- | crates/ra_ide/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index d1bff4a76..779a81b2c 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs | |||
@@ -422,6 +422,11 @@ impl Analysis { | |||
422 | self.with_db(|db| parent_module::crate_for(db, file_id)) | 422 | self.with_db(|db| parent_module::crate_for(db, file_id)) |
423 | } | 423 | } |
424 | 424 | ||
425 | /// Returns the edition of the given crate. | ||
426 | pub fn crate_edition(&self, crate_id: CrateId) -> Cancelable<Edition> { | ||
427 | self.with_db(|db| db.crate_graph().edition(crate_id)) | ||
428 | } | ||
429 | |||
425 | /// Returns the root file of the given crate. | 430 | /// Returns the root file of the given crate. |
426 | pub fn crate_root(&self, crate_id: CrateId) -> Cancelable<FileId> { | 431 | pub fn crate_root(&self, crate_id: CrateId) -> Cancelable<FileId> { |
427 | self.with_db(|db| db.crate_graph().crate_root(crate_id)) | 432 | self.with_db(|db| db.crate_graph().crate_root(crate_id)) |