mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Cleanup crate_graph construction
This commit is contained in:
parent
31db1fc75f
commit
b3919ea80d
7 changed files with 341 additions and 339 deletions
|
@ -253,7 +253,8 @@ impl Crate {
|
|||
}
|
||||
|
||||
pub fn potential_cfg(&self, db: &dyn HirDatabase) -> CfgOptions {
|
||||
db.crate_graph()[self.id].potential_cfg_options.clone()
|
||||
let data = &db.crate_graph()[self.id];
|
||||
data.potential_cfg_options.clone().unwrap_or_else(|| data.cfg_options.clone())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue