Use FixtureMeta in MockAnalysis
This commit is contained in:
@@ -176,7 +176,7 @@ pub struct FileMeta {
|
||||
pub path: RelativePathBuf,
|
||||
pub krate: Option<String>,
|
||||
pub deps: Vec<String>,
|
||||
pub cfg: ra_cfg::CfgOptions,
|
||||
pub cfg: CfgOptions,
|
||||
pub edition: Option<String>,
|
||||
pub env: FxHashMap<String, String>,
|
||||
}
|
||||
@@ -188,6 +188,13 @@ impl FixtureMeta {
|
||||
FixtureMeta::File(f) => &f.path,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn cfg_options(&self) -> Option<&CfgOptions> {
|
||||
match self {
|
||||
FixtureMeta::File(f) => Some(&f.cfg),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Parses text which looks like this:
|
||||
|
||||
Reference in New Issue
Block a user