Expose version string of crates fom HIR
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user