Minimize API
This commit is contained in:
parent
0320ebdd10
commit
254ef1860b
|
@ -111,8 +111,8 @@ pub struct CrateData {
|
||||||
/// This actual crate name can be different in a particular dependent crate
|
/// This actual crate name can be different in a particular dependent crate
|
||||||
/// or may even be missing for some cases, such as a dummy crate for the code snippet.
|
/// or may even be missing for some cases, such as a dummy crate for the code snippet.
|
||||||
pub display_name: Option<String>,
|
pub display_name: Option<String>,
|
||||||
cfg_options: CfgOptions,
|
pub cfg_options: CfgOptions,
|
||||||
env: Env,
|
pub env: Env,
|
||||||
pub dependencies: Vec<Dependency>,
|
pub dependencies: Vec<Dependency>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,10 +149,6 @@ impl CrateGraph {
|
||||||
crate_id
|
crate_id
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn cfg_options(&self, crate_id: CrateId) -> &CfgOptions {
|
|
||||||
&self.arena[&crate_id].cfg_options
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn add_dep(
|
pub fn add_dep(
|
||||||
&mut self,
|
&mut self,
|
||||||
from: CrateId,
|
from: CrateId,
|
||||||
|
|
|
@ -51,7 +51,7 @@ pub(super) fn collect_defs(db: &impl DefDatabase, mut def_map: CrateDefMap) -> C
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let cfg_options = crate_graph.cfg_options(def_map.krate);
|
let cfg_options = &crate_graph[def_map.krate].cfg_options;
|
||||||
|
|
||||||
let mut collector = DefCollector {
|
let mut collector = DefCollector {
|
||||||
db,
|
db,
|
||||||
|
|
Loading…
Reference in a new issue