diff options
Diffstat (limited to 'crates/ra_db/src/input.rs')
-rw-r--r-- | crates/ra_db/src/input.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index b77640b2b..1a1c64202 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs | |||
@@ -261,6 +261,16 @@ impl fmt::Display for Edition { | |||
261 | } | 261 | } |
262 | } | 262 | } |
263 | 263 | ||
264 | impl Env { | ||
265 | pub fn set(&mut self, env: &str, value: String) { | ||
266 | self.entries.insert(env.to_owned(), value); | ||
267 | } | ||
268 | |||
269 | pub fn get(&self, env: &str) -> Option<String> { | ||
270 | self.entries.get(env).cloned() | ||
271 | } | ||
272 | } | ||
273 | |||
264 | #[derive(Debug)] | 274 | #[derive(Debug)] |
265 | pub struct ParseEditionError { | 275 | pub struct ParseEditionError { |
266 | invalid_input: String, | 276 | invalid_input: String, |