Migrate Rig tool flow to domain runtime
This commit is contained in:
@@ -53,7 +53,7 @@ fn canonical_json_value(value: &serde_json::Value) -> String {
|
||||
),
|
||||
serde_json::Value::Object(values) => {
|
||||
let mut entries = values.iter().collect::<Vec<_>>();
|
||||
entries.sort_by(|(left, _), (right, _)| left.cmp(right));
|
||||
entries.sort_by_key(|(key, _)| *key);
|
||||
format!(
|
||||
"{{{}}}",
|
||||
entries
|
||||
|
||||
@@ -164,10 +164,8 @@ impl AcpRuntimeModel {
|
||||
) -> BTreeMap<String, serde_json::Value> {
|
||||
options
|
||||
.iter()
|
||||
.filter_map(|option| {
|
||||
(!option.current_value.is_null())
|
||||
.then(|| (option.id.clone(), option.current_value.clone()))
|
||||
})
|
||||
.filter(|option| !option.current_value.is_null())
|
||||
.map(|option| (option.id.clone(), option.current_value.clone()))
|
||||
.collect()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user