MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / merge_map_deep_values

Function merge_map_deep_values

crates/opencode-config/src/schema.rs:693–704  ·  view source on GitHub ↗
(
    target: &mut HashMap<String, T>,
    source: HashMap<String, T>,
)

Source from the content-addressed store, hash-verified

691}
692
693fn merge_map_deep_values<T: DeepMerge>(
694 target: &mut HashMap<String, T>,
695 source: HashMap<String, T>,
696) {
697 for (key, source_value) in source {
698 if let Some(target_value) = target.get_mut(&key) {
699 target_value.deep_merge(source_value);
700 } else {
701 target.insert(key, source_value);
702 }
703 }
704}
705
706fn merge_option_map_deep_values<T: DeepMerge>(
707 target: &mut Option<HashMap<String, T>>,

Callers 2

deep_mergeMethod · 0.85

Calls 2

deep_mergeMethod · 0.80
get_mutMethod · 0.45

Tested by

no test coverage detected