mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Expose version string of crates fom HIR
This commit is contained in:
parent
b9fa37f5b4
commit
52f5af7165
8 changed files with 111 additions and 1 deletions
|
@ -183,6 +183,10 @@ impl Crate {
|
|||
db.crate_graph()[self.id].edition
|
||||
}
|
||||
|
||||
pub fn version(self, db: &dyn HirDatabase) -> Option<String> {
|
||||
db.crate_graph()[self.id].version.clone()
|
||||
}
|
||||
|
||||
pub fn display_name(self, db: &dyn HirDatabase) -> Option<CrateDisplayName> {
|
||||
db.crate_graph()[self.id].display_name.clone()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue