Start computing workspace configuration more dynamically

This commit is contained in:
Antonio Scandurra 2023-03-15 14:34:48 +01:00
parent ed9927b495
commit 60d3fb48e2
8 changed files with 174 additions and 92 deletions

View file

@ -83,6 +83,24 @@ where
}
}
pub fn merge_json_value_into(source: serde_json::Value, target: &mut serde_json::Value) {
use serde_json::Value;
match (source, target) {
(Value::Object(source), Value::Object(target)) => {
for (key, value) in source {
if let Some(target) = target.get_mut(&key) {
merge_json_value_into(value, target);
} else {
target.insert(key.clone(), value);
}
}
}
(source, target) => *target = source,
}
}
pub trait ResultExt {
type Ok;