in Sources/Confidence/Confidence.swift [342:358]
func updateContext(withValues: ConfidenceStruct, removedKeys: [String]) -> ConfidenceStruct {
contextQueue.sync { [weak self] in
guard let self = self else {
return [:]
}
var map = self.context
for removedKey in removedKeys {
map.removeValue(forKey: removedKey)
removedContextKeys.insert(removedKey)
}
for entry in withValues {
map.updateValue(entry.value, forKey: entry.key)
}
self.context = map
return self.context
}
}