aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cfg/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_cfg/src/lib.rs')
-rw-r--r--crates/ra_cfg/src/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/ra_cfg/src/lib.rs b/crates/ra_cfg/src/lib.rs
index 57feabcb2..f9c73ece1 100644
--- a/crates/ra_cfg/src/lib.rs
+++ b/crates/ra_cfg/src/lib.rs
@@ -46,4 +46,14 @@ impl CfgOptions {
46 pub fn insert_key_value(&mut self, key: SmolStr, value: SmolStr) { 46 pub fn insert_key_value(&mut self, key: SmolStr, value: SmolStr) {
47 self.key_values.insert((key, value)); 47 self.key_values.insert((key, value));
48 } 48 }
49
50 pub fn append(&mut self, other: &CfgOptions) {
51 for atom in &other.atoms {
52 self.atoms.insert(atom.clone());
53 }
54
55 for (key, value) in &other.key_values {
56 self.key_values.insert((key.clone(), value.clone()));
57 }
58 }
49} 59}