mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 15:15:24 +00:00
Propogate fixture meta to AnalysisHost
Except crate name.
This commit is contained in:
parent
2dde9b1994
commit
2c00bd8c6a
5 changed files with 113 additions and 16 deletions
|
@ -311,6 +311,21 @@ impl fmt::Display for Edition {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> From<T> for Env
|
||||
where
|
||||
T: Iterator<Item = (&'a String, &'a String)>,
|
||||
{
|
||||
fn from(iter: T) -> Self {
|
||||
let mut result = Self::default();
|
||||
|
||||
for (k, v) in iter {
|
||||
result.entries.insert(k.to_owned(), v.to_owned());
|
||||
}
|
||||
|
||||
result
|
||||
}
|
||||
}
|
||||
|
||||
impl Env {
|
||||
pub fn set(&mut self, env: &str, value: String) {
|
||||
self.entries.insert(env.to_owned(), value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue